{
  "components": {
    "schemas": {
      "AccountClosure": {
        "additionalProperties": false,
        "properties": {
          "case_id": {
            "format": "uuid",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "due_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "scope": {
            "enum": [
              "account",
              "workspace"
            ],
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "AccountClosureInput": {
        "additionalProperties": false,
        "properties": {
          "confirm": {
            "const": true,
            "type": "boolean"
          },
          "current_password": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "scope": {
            "enum": [
              "account",
              "workspace"
            ],
            "type": "string"
          }
        },
        "required": [
          "scope",
          "current_password",
          "confirm",
          "request_id"
        ],
        "type": "object"
      },
      "AccountClosureList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AccountClosure"
            },
            "type": "array"
          },
          "now": {
            "format": "date-time",
            "type": "string"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "AccountClosureReview": {
        "additionalProperties": false,
        "properties": {
          "acknowledge_finance": {
            "type": "boolean"
          },
          "approve": {
            "type": "boolean"
          },
          "decision": {
            "type": "string"
          }
        },
        "required": [
          "approve",
          "decision"
        ],
        "type": "object"
      },
      "AccountCorrection": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "type": "string"
          }
        },
        "required": [
          "name",
          "current_password"
        ],
        "type": "object"
      },
      "Activation": {
        "additionalProperties": false,
        "example": {
          "created_at": "2026-10-18T00:00:00Z",
          "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "device_name": "Office PC",
          "generation": 1,
          "id": "44444444-4444-4444-8444-444444444444",
          "last_seen_at": "2026-10-18T00:00:00Z",
          "license_id": "33333333-3333-4333-8333-333333333333",
          "product_id": "11111111-1111-4111-8111-111111111111",
          "released_at": null,
          "status": "active",
          "virtual_machine": false
        },
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "device_id": {
            "description": "بصمة جهاز ضمن نطاق المنتج يشتقها SDK، عادةً 64 محرفًا سداسيًا عشريًا صغيرًا.",
            "type": "string"
          },
          "device_name": {
            "description": "تسمية جهاز مقروءة للبشر، وليست هوية أمنية.",
            "type": "string"
          },
          "generation": {
            "description": "جيل التفعيل المستخدم لإبطال بيانات الأجهزة القديمة.",
            "type": "integer"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "last_seen_at": {
            "description": "الطابع الزمني لآخر نشاط جهاز رصده الخادم، UTC.",
            "format": "date-time",
            "type": "string"
          },
          "lease_expires_at": {
            "anyOf": [
              {
                "description": "انتهاء إيجار المقعد العائم؛ يمكن استعادة المقاعد المنتهية.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء إيجار المقعد العائم؛ يمكن استعادة المقاعد المنتهية.",
                "type": "null"
              }
            ],
            "description": "انتهاء إيجار المقعد العائم؛ يمكن استعادة المقاعد المنتهية."
          },
          "license_id": {
            "description": "UUID الترخيص، وهو مختلف عن السر lv_lic_.",
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "released_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني للتحرير؛ null حتى التحرير.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني للتحرير؛ null حتى التحرير.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني للتحرير؛ null حتى التحرير."
          },
          "session_id": {
            "description": "معرّف جلسة المثيل العائم؛ يمكن حذفه للتراخيص المرتبطة بالعقدة.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "active",
              "released"
            ],
            "type": "string"
          },
          "virtual_machine": {
            "description": "ما إذا اكتشف SDK آلة افتراضية.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "product_id",
          "license_id",
          "device_id",
          "virtual_machine",
          "device_name",
          "status",
          "generation",
          "created_at",
          "last_seen_at",
          "released_at"
        ],
        "type": "object"
      },
      "ActivationList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Activation"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "AdminPlanList": {
        "additionalProperties": false,
        "properties": {
          "currencies": {
            "items": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            "type": "array"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Price"
            },
            "type": "array"
          },
          "settings": {
            "$ref": "#/components/schemas/DefaultPlan"
          }
        },
        "required": [],
        "type": "object"
      },
      "AttemptList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "anyOf": [
              {
                "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
                "items": {
                  "$ref": "#/components/schemas/WebhookAttempt"
                },
                "type": "array"
              },
              {
                "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
                "type": "null"
              }
            ],
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type."
          }
        },
        "required": [],
        "type": "object"
      },
      "Audit": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "description": "معرّف إجراء التدقيق، مثل product.create أو license.renew.",
            "type": "string"
          },
          "actor_id": {
            "description": "UUID الحساب المسؤول عن الإجراء.",
            "format": "uuid",
            "type": "string"
          },
          "actor_kind": {
            "description": "مصدر الإجراء: session أو api_key أو system.",
            "enum": [
              "session",
              "api_key",
              "system"
            ],
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "type": "string"
          },
          "resource_id": {
            "description": "UUID المورد المتأثر.",
            "maxLength": 36,
            "type": "string"
          }
        },
        "required": [
          "id",
          "action",
          "resource_id",
          "created_at"
        ],
        "type": "object"
      },
      "AuditList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Audit"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "AutoRenewal": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "المبلغ بأجزاء المئة؛ قد تكون قيود الدفتر أرصدة موجبة أو خصومات سالبة.",
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كانت واجهة webhook مفعلة.",
            "type": "boolean"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "plan_name": {
            "description": "اسم عرض الخطة.",
            "type": "string"
          },
          "policy_version": {
            "description": "مراجعة سياسة الخدمة المقبولة عند حفظ التجديد التلقائي.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "disabled",
              "enabled",
              "insufficient_balance",
              "price_changed",
              "plan_changed",
              "plan_unavailable",
              "account_unavailable"
            ],
            "type": "string"
          },
          "term_months": {
            "description": "عدد الأشهر في المدة المشتراة.",
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "مراجعة إعداد التجديد التلقائي.",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "enabled",
          "plan",
          "plan_name",
          "currency",
          "price_version",
          "term_months",
          "amount_cents",
          "status",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "AutoRenewalInput": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "expected_version": {
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "plan": {
            "type": "string"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "term_months": {
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "expected_version"
        ],
        "type": "object"
      },
      "AutoRenewalResult": {
        "additionalProperties": false,
        "properties": {
          "next_renewal_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني المتوقع للتجديد التالي بتوقيت UTC؛ قد يكون null إذا كان معطلًا أو غير ضروري.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني المتوقع للتجديد التالي بتوقيت UTC؛ قد يكون null إذا كان معطلًا أو غير ضروري.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني المتوقع للتجديد التالي بتوقيت UTC؛ قد يكون null إذا كان معطلًا أو غير ضروري."
          },
          "setting": {
            "$ref": "#/components/schemas/AutoRenewal",
            "description": "إعداد التجديد التلقائي الحالي."
          }
        },
        "required": [
          "setting",
          "next_renewal_at"
        ],
        "type": "object"
      },
      "BatchInput": {
        "additionalProperties": false,
        "properties": {
          "days": {
            "description": "مطلوب لـ renew: أيام صلاحية إضافية، 1–36500؛ لا تستخدمه العمليات الأخرى.",
            "maximum": 36500,
            "minimum": 1,
            "type": "integer"
          },
          "duration_days": {
            "description": "المدة المشتركة لإدخالات create التي تحذف duration_days. يمكن لكل إدخال تجاوزها. مطلوبة لإدخالات timed/trial دون مدة خاصة؛ وتُحذف لإنشاء perpetual.",
            "maximum": 36500,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "entries": {
            "description": "مطلوب لـ create: من 1–100 إدخال عميل؛ يُحذف للعمليات الأخرى.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "customer": {
                  "description": "تسمية عميل يحددها المورّد، مختلفة عن بريد بوابة العميل.",
                  "maxLength": 120,
                  "type": "string"
                },
                "customer_email": {
                  "description": "بريد بوابة العميل المرتبط؛ فارغ عند عدم التعيين.",
                  "maxLength": 254,
                  "type": "string"
                },
                "duration_days": {
                  "description": "مدة الإنشاء لكل ترخيص؛ تتجاوز BatchInput.duration_days. احذفها لاستخدام مدة الإنشاء المشتركة.",
                  "maximum": 36500,
                  "minimum": 1,
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [],
              "type": "object"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          },
          "ids": {
            "description": "مطلوب لـ renew وrevoke وapply_policy: من 1–100 UUID ترخيص متميز؛ يُحذف لـ create.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "operation": {
            "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
            "enum": [
              "create",
              "renew",
              "revoke",
              "apply_policy"
            ],
            "type": "string"
          },
          "policy_id": {
            "description": "مطلوب لـ create وapply_policy: UUID سياسة الترخيص المستهدفة.",
            "format": "uuid",
            "type": "string"
          },
          "preview_token": {
            "description": "رمز تأكيد معاينة مشفر مطلوب لـ apply_policy؛ صالح 600 ثانية وتبطله تغييرات الموارد.",
            "type": "string",
            "writeOnly": true
          },
          "product_id": {
            "description": "مطلوب لـ create: UUID المنتج للتراخيص الجديدة.",
            "format": "uuid",
            "type": "string"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "operation"
        ],
        "type": "object"
      },
      "BatchItem": {
        "additionalProperties": false,
        "example": {
          "customer": "Order #1001",
          "customer_email": "buyer@example.com",
          "duration_days": 30,
          "expires_at": null,
          "first_activated_at": null,
          "id": "33333333-3333-4333-8333-333333333333",
          "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
        },
        "properties": {
          "customer": {
            "description": "تسمية عميل يحددها المورّد، مختلفة عن بريد بوابة العميل.",
            "type": "string"
          },
          "customer_email": {
            "description": "بريد بوابة العميل المرتبط؛ فارغ عند عدم التعيين.",
            "type": "string"
          },
          "duration_days": {
            "description": "أيام كل ترخيص منذ أول تفعيل. يلزم 1–36500 لإصدار timed/trial؛ وغائبة/null لـ perpetual. لا تُخزن في السياسة مطلقًا.",
            "type": [
              "integer",
              "null"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "type": "null"
              }
            ],
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد."
          },
          "first_activated_at": {
            "anyOf": [
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل."
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "license_key": {
            "description": "مفتاح ترخيص العميل الكامل المقدم عند التفعيل. لا يحتوي رمز تهيئة المنتج وتنزيلات الأمثلة على هذا السر. تستخدم الطلبات دون اتصال بيانات الاعتماد التي يوفرها SDK.",
            "type": "string"
          },
          "operation": {
            "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
            "enum": [
              "create",
              "renew",
              "revoke",
              "apply_policy"
            ],
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "BatchResult": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "description": "العدد في المجموعة الحالية أو عدد السجلات التي عالجتها دفعة.",
            "type": "integer"
          },
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/BatchItem"
            },
            "type": "array"
          },
          "operation": {
            "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
            "enum": [
              "create",
              "renew",
              "revoke",
              "apply_policy"
            ],
            "type": "string"
          },
          "request_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "operation",
          "items",
          "count"
        ],
        "type": "object"
      },
      "BillingEmailPreview": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "link": {
            "format": "uri",
            "type": "string"
          },
          "reply_to": {
            "description": "بريد الدعم العام وReply-To لبريد الفوترة. تخفي القيمة الفارغة جهة الاتصال. لا يغير عنوان SMTP From الحالي ولا ينشئ صندوق وارد.",
            "maxLength": 254,
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "id",
          "to",
          "subject",
          "body",
          "link"
        ],
        "type": "object"
      },
      "BillingEmailTestInput": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "enum": [
              "purchase_success",
              "expiry_reminder",
              "auto_renewal_success",
              "auto_renewal_problem"
            ],
            "type": "string"
          },
          "locale": {
            "default": "zh",
            "enum": [
              "zh",
              "zh-hant",
              "en",
              "es",
              "hi",
              "ar",
              "fr",
              "bn",
              "pt",
              "id",
              "ur"
            ],
            "type": "string"
          },
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "to"
        ],
        "type": "object"
      },
      "BillingJob": {
        "additionalProperties": false,
        "properties": {
          "attempts": {
            "description": "عدد محاولات المهمة التراكمي.",
            "type": "integer"
          },
          "available_at": {
            "description": "أقرب وقت UTC يمكن تشغيل المهمة فيه.",
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "last_error": {
            "description": "أحدث فئة فشل؛ قد تكون فارغة.",
            "type": "string"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "pending",
              "running",
              "done",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "month",
          "status"
        ],
        "type": "object"
      },
      "BillingJobList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/BillingJob"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "BillingNotificationPreference": {
        "additionalProperties": false,
        "properties": {
          "auto_renewal_problem": {
            "default": true,
            "type": "boolean"
          },
          "auto_renewal_success": {
            "default": true,
            "type": "boolean"
          },
          "expiry_reminder": {
            "default": true,
            "type": "boolean"
          },
          "locale": {
            "enum": [
              "zh",
              "zh-hant",
              "en",
              "es",
              "hi",
              "ar",
              "fr",
              "bn",
              "pt",
              "id",
              "ur"
            ],
            "type": "string"
          },
          "purchase_success": {
            "default": true,
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "purchase_success",
          "expiry_reminder",
          "auto_renewal_success",
          "auto_renewal_problem",
          "locale",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "BillingNotificationPreferenceInput": {
        "additionalProperties": false,
        "properties": {
          "auto_renewal_problem": {
            "default": true,
            "type": "boolean"
          },
          "auto_renewal_success": {
            "default": true,
            "type": "boolean"
          },
          "expected_version": {
            "description": "Version من GET؛ فارغ للتفضيل الذي لم يُحفظ بعد. تعيد القيمة القديمة BILLING_EMAIL_PREFERENCE_CONFLICT.",
            "type": "string"
          },
          "expiry_reminder": {
            "default": true,
            "type": "boolean"
          },
          "locale": {
            "enum": [
              "zh",
              "zh-hant",
              "en",
              "es",
              "hi",
              "ar",
              "fr",
              "bn",
              "pt",
              "id",
              "ur"
            ],
            "type": "string"
          },
          "purchase_success": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "expected_version"
        ],
        "type": "object"
      },
      "BillingNotificationPreferencesResult": {
        "additionalProperties": false,
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/BillingNotificationSettings"
          },
          "preferences": {
            "$ref": "#/components/schemas/BillingNotificationPreference"
          },
          "recipient": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "preferences",
          "platform",
          "recipient"
        ],
        "type": "object"
      },
      "BillingNotificationSettings": {
        "additionalProperties": false,
        "properties": {
          "auto_renewal_problem": {
            "default": true,
            "type": "boolean"
          },
          "auto_renewal_success": {
            "default": true,
            "type": "boolean"
          },
          "expiry_reminder": {
            "default": true,
            "type": "boolean"
          },
          "purchase_success": {
            "default": true,
            "type": "boolean"
          },
          "reminder_days": {
            "default": [
              7
            ],
            "description": "العتبات قبل انتهاء التغطية المستمرة، بأيام من 24 ساعة. تُخزن تصاعديًا. يختار العامل المتأخر البدء أقرب عتبة متبقية فقط، وليس كل تذكير فائت.",
            "items": {
              "maximum": 90,
              "minimum": 1,
              "type": "integer"
            },
            "maxItems": 10,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "support_email": {
            "description": "بريد الدعم العام وReply-To لبريد الفوترة. تخفي القيمة الفارغة جهة الاتصال. لا يغير عنوان SMTP From الحالي ولا ينشئ صندوق وارد.",
            "maxLength": 254,
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "purchase_success",
          "expiry_reminder",
          "auto_renewal_success",
          "auto_renewal_problem",
          "reminder_days",
          "support_email",
          "version"
        ],
        "type": "object"
      },
      "BillingNotificationSettingsInput": {
        "additionalProperties": false,
        "properties": {
          "auto_renewal_problem": {
            "default": true,
            "type": "boolean"
          },
          "auto_renewal_success": {
            "default": true,
            "type": "boolean"
          },
          "expected_version": {
            "description": "Version من GET. تعيد القيمة القديمة BILLING_EMAIL_SETTINGS_CONFLICT.",
            "type": "string"
          },
          "expiry_reminder": {
            "default": true,
            "type": "boolean"
          },
          "purchase_success": {
            "default": true,
            "type": "boolean"
          },
          "reminder_days": {
            "default": [
              7
            ],
            "description": "العتبات قبل انتهاء التغطية المستمرة، بأيام من 24 ساعة. تُخزن تصاعديًا. يختار العامل المتأخر البدء أقرب عتبة متبقية فقط، وليس كل تذكير فائت.",
            "items": {
              "maximum": 90,
              "minimum": 1,
              "type": "integer"
            },
            "maxItems": 10,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "support_email": {
            "description": "بريد الدعم العام وReply-To لبريد الفوترة. تخفي القيمة الفارغة جهة الاتصال. لا يغير عنوان SMTP From الحالي ولا ينشئ صندوق وارد.",
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "expected_version"
        ],
        "type": "object"
      },
      "BundleInput": {
        "additionalProperties": false,
        "properties": {
          "language": {
            "description": "معرّف لغة SDK لحزمة التنزيل.",
            "enum": [
              "go",
              "java",
              "c",
              "cpp",
              "csharp",
              "python",
              "javascript",
              "rust",
              "ruby"
            ],
            "type": "string"
          }
        },
        "required": [
          "language"
        ],
        "type": "object"
      },
      "BuyPlan": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "plan": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "renewal": {
            "default": false,
            "description": "تجديد مقدم صريح. يُحصّل الدفع الآن وتُمدد التغطية المدفوعة مسبقًا فورًا. تتبع دورة الحصة التالية التغطية المدفوعة أو المهداة الحالية. لا يُعاد ضبط الاستخدام الحالي. جدّد أحدث خطة وعملة مدفوعتين؛ ويمكن للعملاء المنتهية صلاحيتهم الشراء بصورة عادية أيضًا.",
            "type": "boolean"
          },
          "request_id": {
            "maxLength": 80,
            "type": "string"
          },
          "term_months": {
            "default": 1,
            "description": "مدة العقد. يكون الافتراضي شهرًا واحدًا عند الإغفال. يؤدي تغيير المدة على request_id معاد الاستخدام إلى إعادة 409.",
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          }
        },
        "required": [
          "plan",
          "currency",
          "price_version",
          "request_id"
        ],
        "type": "object"
      },
      "CSRF": {
        "additionalProperties": false,
        "properties": {
          "csrf_token": {
            "type": "string"
          }
        },
        "required": [
          "csrf_token"
        ],
        "type": "object"
      },
      "CancelCustomerRefund": {
        "additionalProperties": false,
        "properties": {
          "confirm_service_stays_cancelled": {
            "description": "مطلوب عندما يكون إلغاء الخدمة قد نُفذ بالفعل قبل المراجعة. يمكن سحب طلب معلق ذي نطاق صريح دون إيقاف الخدمة أو استعادتها.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ChangePassword": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "description": "12–128 بايت UTF-8، وليس محارف",
            "type": "string",
            "writeOnly": true
          },
          "password": {
            "description": "12–128 بايت UTF-8، وليس محارف",
            "type": "string",
            "writeOnly": true
          },
          "password_confirmation": {
            "description": "مطلوب ويجب أن يطابق كلمة المرور تمامًا",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "current_password",
          "password",
          "password_confirmation"
        ],
        "type": "object"
      },
      "ClosureExportCredential": {
        "additionalProperties": false,
        "properties": {
          "download_url": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "export_deadline": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "ClosureExportLogin": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "email",
          "current_password"
        ],
        "type": "object"
      },
      "CommerceNotice": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "description": "نص إشعار الخدمة.",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "effective_at": {
            "anyOf": [
              {
                "description": "وقت سريان التغيير المُبلّغ عنه، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "وقت سريان التغيير المُبلّغ عنه، أو null.",
                "type": "null"
              }
            ],
            "description": "وقت سريان التغيير المُبلّغ عنه، أو null."
          },
          "emailed_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لتسليم بريد الإشعار، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لتسليم بريد الإشعار، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لتسليم بريد الإشعار، أو null."
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "description": "معرّف فئة قيد الدفتر أو الإشعار.",
            "type": "string"
          },
          "read_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لقراءة الإشعار، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لقراءة الإشعار، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لقراءة الإشعار، أو null."
          },
          "reference": {
            "description": "مرجع الأعمال المرتبط المستخدم للتتبع.",
            "type": "string"
          },
          "title": {
            "description": "عنوان إشعار الخدمة.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "CommerceNoticeList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/CommerceNotice"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CommercePolicy": {
        "additionalProperties": false,
        "properties": {
          "documents": {
            "properties": {
              "privacy": {
                "type": "string"
              },
              "refunds": {
                "type": "string"
              },
              "terms": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "locale": {
            "type": "string"
          },
          "pending": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "effective_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "profile": {
            "$ref": "#/components/schemas/OperatorProfile"
          },
          "published": {
            "type": "boolean"
          },
          "ready": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "CommercePolicyInput": {
        "additionalProperties": false,
        "properties": {
          "expected_version": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/OperatorProfile"
          },
          "published": {
            "type": "boolean"
          }
        },
        "required": [
          "profile",
          "published",
          "expected_version"
        ],
        "type": "object"
      },
      "CommerceResult": {
        "additionalProperties": true,
        "type": "object"
      },
      "Confirmation": {
        "additionalProperties": false,
        "properties": {
          "confirm": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "confirm"
        ],
        "type": "object"
      },
      "Consumption": {
        "additionalProperties": false,
        "properties": {
          "feature": {
            "description": "معرّف الميزة المستهلكة.",
            "type": "string"
          },
          "limit": {
            "description": "حد استخدام الميزة لفترة الحصة هذه.",
            "type": "integer"
          },
          "overage": {
            "description": "الوحدات فوق الحد في هذه الفترة، وليست أموالًا. تتحكم السياسة في سقف زيادة الميزة.",
            "type": "integer"
          },
          "period": {
            "description": "فترة القياس: YYYY-MM للشهرية وYYYY-MM-DD لليومية وlifetime للإجمالي. تستخدم الحدود اليومية/الشهرية UTC.",
            "type": "string"
          },
          "quantity": {
            "description": "الوحدات المطلوبة لهذه العملية، عدد صحيح 1–1000000000.",
            "type": "integer"
          },
          "remaining": {
            "description": "remaining = max(0, limit - used - reserved)، باستثناء وحدات الزيادة.",
            "type": "integer"
          },
          "reserved": {
            "description": "الوحدات المحجوزة غير المنتهية في هذه الفترة والتي لم تُخصم بعد.",
            "type": "integer"
          },
          "reset_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "إعادة الضبط التالية، UTC ISO 8601؛ تكون null لقياس lifetime."
          },
          "used": {
            "description": "الوحدات المعتمدة في هذه الفترة، باستثناء الحجوزات.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "ConsumptionResult": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID ربط الجهاز أو جلسة التشغيل. احفظه لطلبات الترخيص المستقبلية؛ ليس مفتاح ترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "consumption": {
            "$ref": "#/components/schemas/Consumption"
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0
              },
              {
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "فاصل ضربات القلب الحالي بالثواني؛ لا يحدّث القياس التوقيع أو المؤقت.",
            "type": "integer"
          }
        },
        "required": [
          "activation_id",
          "consumption"
        ],
        "type": "object"
      },
      "CustomerAssignment": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "القيمة الفارغة تزيل ربط البوابة",
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "CustomerControlsInput": {
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "device_enabled"
            ]
          },
          {
            "required": [
              "api_enabled"
            ]
          }
        ],
        "properties": {
          "api_enabled": {
            "type": "boolean"
          },
          "device_enabled": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "CustomerControlsResult": {
        "additionalProperties": false,
        "properties": {
          "api_enabled": {
            "type": "boolean"
          },
          "device_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "device_enabled",
          "api_enabled"
        ],
        "type": "object"
      },
      "CustomerDataExportInput": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "type": "string"
          },
          "scope": {
            "enum": [
              "account",
              "workspace"
            ],
            "type": "string"
          }
        },
        "required": [
          "scope",
          "current_password",
          "reason"
        ],
        "type": "object"
      },
      "CustomerLicenses": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "email",
          "items"
        ],
        "type": "object"
      },
      "CustomerOverageConsent": {
        "additionalProperties": false,
        "properties": {
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          }
        },
        "required": [
          "price_version",
          "policy_version",
          "terms_accepted",
          "overage_accepted"
        ],
        "type": "object"
      },
      "CustomerRefundInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "string"
          },
          "change_id": {
            "type": "string"
          },
          "confirm_termination": {
            "type": "boolean"
          },
          "incident_id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "purchase_id": {
            "type": "string"
          },
          "quote_hash": {
            "type": "string"
          },
          "quoted_at": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "enum": [
              "customer_request",
              "future",
              "wallet",
              "usage_change",
              "platform_failure",
              "statutory",
              "billing_error",
              "failed_delivery"
            ],
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "scope": {
            "description": "يستخدم النطاق الصريح الإلغاء عند الموافقة؛ ويسمح الإغفال بالإلغاء الفوري المؤهل بعد تأكيد صريح.",
            "enum": [
              "purchase",
              "service"
            ],
            "type": "string"
          }
        },
        "required": [
          "reason",
          "message",
          "request_id"
        ],
        "type": "object"
      },
      "CustomerRefundQuote": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/RefundQuote"
          },
          {
            "$ref": "#/components/schemas/ScopedRefundPreview"
          }
        ]
      },
      "CustomerRefundQuoteInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "string"
          },
          "change_id": {
            "type": "string"
          },
          "confirm_termination": {
            "type": "boolean"
          },
          "incident_id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "purchase_id": {
            "type": "string"
          },
          "quote_hash": {
            "type": "string"
          },
          "quoted_at": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "enum": [
              "customer_request",
              "future",
              "wallet",
              "usage_change",
              "platform_failure",
              "statutory",
              "billing_error",
              "failed_delivery"
            ],
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "scope": {
            "description": "يستخدم النطاق الصريح الإلغاء عند الموافقة؛ ويسمح الإغفال بالإلغاء الفوري المؤهل بعد تأكيد صريح.",
            "enum": [
              "purchase",
              "service"
            ],
            "type": "string"
          }
        },
        "required": [
          "reason",
          "message"
        ],
        "type": "object"
      },
      "CustomerReleaseInput": {
        "additionalProperties": false,
        "description": "أكد التحرير قبل الإرسال. يدرج send_email اختياريًا الرمز المؤقت إلى عنوان العميل المتحقق منه في الطابور؛ وتحمي generation من عرض جهاز قديم.",
        "properties": {
          "generation": {
            "minimum": 1,
            "type": "integer"
          },
          "send_email": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "CustomerReleaseResult": {
        "additionalProperties": false,
        "properties": {
          "email_queued": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "const": "released",
            "type": "string"
          },
          "transfer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransferCode"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "transfer",
          "email_queued"
        ],
        "type": "object"
      },
      "CustomerSession": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "DatabaseStatus": {
        "additionalProperties": false,
        "properties": {
          "connected": {
            "type": "boolean"
          },
          "database": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "open_connections": {
            "type": "integer"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "connected",
          "host",
          "database"
        ],
        "type": "object"
      },
      "DefaultPlan": {
        "additionalProperties": false,
        "properties": {
          "allow_customer_api_overage": {
            "default": false,
            "description": "يسمح بخيارات زيادة API للعميل فقط. مستقل عن إذن الأجهزة. عندما تكون false يتبع استخدام API قواعد المسؤول. يظل API غير المحدود غير محدود.",
            "type": "boolean"
          },
          "allow_customer_device_overage": {
            "default": false,
            "description": "يسمح بخيارات زيادة أجهزة العميل فقط. عندما تكون false يتبع استخدام الأجهزة قواعد المسؤول وتُتجاهل خيارات العميل المحفوظة للأجهزة حتى إعادة التفعيل.",
            "type": "boolean"
          },
          "default_currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "default_plan": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          }
        },
        "required": [
          "default_plan",
          "default_currency"
        ],
        "type": "object"
      },
      "DeliveryList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "anyOf": [
              {
                "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
                "items": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                },
                "type": "array"
              },
              {
                "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
                "type": "null"
              }
            ],
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type."
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "DeviceProfile": {
        "additionalProperties": false,
        "properties": {
          "hardware_id": {
            "description": "SHA-256 لهوية المنتج والأجهزة. فارغ إذا لم يتوفر؛ وسترفضه السياسات التي تتطلب الأجهزة.",
            "type": "string"
          },
          "platform": {
            "description": "نظام التشغيل المحلي: windows أو linux أو darwin (macOS).",
            "enum": [
              "windows",
              "linux",
              "darwin"
            ],
            "type": "string"
          },
          "system_id": {
            "description": "SHA-256 لهوية المنتج والنظام: 64 محرفًا سداسيًا عشريًا صغيرًا.",
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "version": {
            "const": 3,
            "description": "إصدار بروتوكول بصمة الجهاز، حاليًا 3.",
            "type": "integer"
          },
          "virtual_machine": {
            "description": "قيمة منطقية: ما إذا اكتشف SDK آلة افتراضية.",
            "type": "boolean"
          }
        },
        "required": [
          "version",
          "system_id",
          "hardware_id",
          "virtual_machine",
          "platform"
        ],
        "type": "object"
      },
      "DeviceReleaseOperation": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "attempts": {
            "description": "عدد محاولات المعالجة الفاشلة التي يحتفظ بها Licentivo.",
            "type": "integer"
          },
          "available_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "description": "وقت إنشاء السجل بتوقيت UTC.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "وقت اكتمال العملية؛ يُحذف أثناء الانتظار.",
                "type": "null"
              }
            ],
            "description": "وقت اكتمال العملية؛ يُحذف أثناء الانتظار."
          },
          "connection_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "error_code": {
            "description": "سبب معالجة أو مراجعة ثابت؛ فارغ بعد النجاح.",
            "type": "string"
          },
          "expected_generation": {
            "description": "جيل ربط الجهاز المتوقع، ويُقارن داخل معاملة الإلغاء.",
            "minimum": 1,
            "type": "integer"
          },
          "license_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "operation_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "source": {
            "description": "مصدر عملية الإلغاء هذه.",
            "enum": [
              "logout",
              "launch",
              "admin"
            ],
            "type": "string"
          },
          "status": {
            "description": "حالة دورة الحياة أو المعالجة الحالية التي يملكها الخادم.",
            "enum": [
              "pending",
              "succeeded",
              "stale",
              "manual_review"
            ],
            "type": "string"
          }
        },
        "required": [
          "operation_id",
          "license_id",
          "activation_id",
          "expected_generation",
          "source",
          "status"
        ],
        "type": "object"
      },
      "EligibleReleases": {
        "additionalProperties": false,
        "properties": {
          "authorization": {
            "additionalProperties": true,
            "type": "object"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Release"
            },
            "type": "array"
          }
        },
        "required": [],
        "type": "object"
      },
      "Email": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "EmailChangeConfirmation": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "maxLength": 2048,
            "minLength": 32,
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "Empty": {
        "additionalProperties": false,
        "properties": {},
        "required": [],
        "type": "object"
      },
      "EmptyRefundPreviewInput": {
        "additionalProperties": false,
        "properties": {},
        "required": [],
        "type": "object"
      },
      "Error": {
        "additionalProperties": false,
        "example": {
          "error": {
            "code": "UNAUTHENTICATED",
            "message": "Please sign in again"
          },
          "request_id": "55555555-5555-4555-8555-555555555555"
        },
        "properties": {
          "error": {
            "additionalProperties": false,
            "description": "كائن خطأ أو فئة فشل التسليم؛ راجع الحقول الفرعية أو النوع الحالي.",
            "properties": {
              "code": {
                "description": "رمز خطأ ثابت قابل لقراءة الآلة.",
                "type": "string"
              },
              "message": {
                "description": "رسالة خطأ مقروءة للبشر؛ استخدم الرمز للتفرع بدلًا منها.",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "request_id": {
            "description": "UUID طلب HTTP ينشئه الخادم للبحث في السجلات؛ ليس معرّف ترخيص أو عدم تكرار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "error",
          "request_id"
        ],
        "type": "object"
      },
      "FeatureReservation": {
        "additionalProperties": false,
        "properties": {
          "consumption": {
            "$ref": "#/components/schemas/Consumption",
            "description": "إيصال الاستخدام: الوحدات المخصومة والاستخدام التراكمي والحصة المتبقية وإعادة الضبط التالية."
          },
          "expires_at": {
            "description": "موعد الحجز النهائي بتوقيت UTC؛ اعتمد قبل هذا الوقت.",
            "format": "date-time",
            "type": "string"
          },
          "operation_id": {
            "description": "معرّف المهمة الأصلي المستخدم للحجز؛ احتفظ به لإعادة المحاولة.",
            "type": "string"
          },
          "reservation_id": {
            "description": "معرّف الحجز؛ أرسل هذه القيمة للاعتماد أو الإلغاء.",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "pending: نفّذ العملية؛ committed: تم الخصم؛ canceled وexpired: أُغلق دون خصم.",
            "enum": [
              "pending",
              "committed",
              "canceled",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "reservation_id",
          "operation_id",
          "status",
          "expires_at",
          "consumption"
        ],
        "type": "object"
      },
      "FeatureUsage": {
        "additionalProperties": false,
        "properties": {
          "feature": {
            "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
            "type": "string"
          },
          "license_id": {
            "description": "UUID الترخيص، وهو مختلف عن السر lv_lic_.",
            "format": "uuid",
            "type": "string"
          },
          "period": {
            "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
            "type": "string"
          },
          "quantity": {
            "description": "الكمية التراكمية المستخدمة لهذه الميزة والفترة.",
            "type": "integer"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "license_id",
          "feature",
          "period",
          "quantity",
          "updated_at"
        ],
        "type": "object"
      },
      "ForumAuthor": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "ForumImage": {
        "additionalProperties": false,
        "properties": {
          "height": {
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "url",
          "width",
          "height",
          "size"
        ],
        "type": "object"
      },
      "ForumModerationInput": {
        "additionalProperties": false,
        "description": "تتطلب جلسة متصفح مسؤول المنصة. قدّم حقلًا واحدًا على الأقل؛ تحتفظ الحقول المحذوفة بقيمها الحالية. ينطبق التثبيت على الموضوعات المنشورة أو المخفية ولا يستعيد المحتوى المحذوف.",
        "minProperties": 1,
        "properties": {
          "hidden": {
            "type": "boolean"
          },
          "locked": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "ForumReply": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "$ref": "#/components/schemas/ForumAuthor"
          },
          "body": {
            "type": "string"
          },
          "can_delete": {
            "type": "boolean"
          },
          "can_edit": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/ForumImage"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "author",
          "images",
          "created_at",
          "updated_at",
          "can_edit",
          "can_delete"
        ],
        "type": "object"
      },
      "ForumReplyInput": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 12000,
            "minLength": 1,
            "type": "string"
          },
          "image_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 6,
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "body"
        ],
        "type": "object"
      },
      "ForumTopic": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "$ref": "#/components/schemas/ForumAuthor"
          },
          "body": {
            "type": "string"
          },
          "can_delete": {
            "type": "boolean"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_moderate": {
            "type": "boolean"
          },
          "category": {
            "enum": [
              "integration",
              "help",
              "ideas",
              "showcase"
            ],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/ForumImage"
            },
            "type": "array"
          },
          "language": {
            "enum": [
              "en",
              "zh",
              "zh-hant",
              "hi",
              "es",
              "ar",
              "fr",
              "bn",
              "pt",
              "id",
              "ur"
            ],
            "type": "string"
          },
          "last_reply_at": {
            "format": "date-time",
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          },
          "reply_count": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "body",
          "category",
          "language",
          "locked",
          "pinned",
          "author",
          "images",
          "reply_count",
          "created_at",
          "updated_at",
          "last_reply_at",
          "can_edit",
          "can_delete",
          "can_moderate"
        ],
        "type": "object"
      },
      "ForumTopicDetail": {
        "additionalProperties": false,
        "properties": {
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "replies": {
            "items": {
              "$ref": "#/components/schemas/ForumReply"
            },
            "type": "array"
          },
          "topic": {
            "$ref": "#/components/schemas/ForumTopic"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "topic",
          "replies",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "ForumTopicInput": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 12000,
            "minLength": 1,
            "type": "string"
          },
          "category": {
            "enum": [
              "integration",
              "help",
              "ideas",
              "showcase"
            ],
            "type": "string"
          },
          "image_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 6,
            "type": "array",
            "uniqueItems": true
          },
          "language": {
            "enum": [
              "en",
              "zh",
              "zh-hant",
              "hi",
              "es",
              "ar",
              "fr",
              "bn",
              "pt",
              "id",
              "ur"
            ],
            "type": "string"
          },
          "title": {
            "maxLength": 180,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "title",
          "body",
          "category",
          "language"
        ],
        "type": "object"
      },
      "ForumTopicList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ForumTopic"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "ForumTranslationInput": {
        "additionalProperties": false,
        "properties": {
          "reply_id": {
            "format": "uuid",
            "type": "string"
          },
          "target_language": {
            "description": "اختر لغة يعيدها GET /forum/translation.",
            "type": "string"
          }
        },
        "required": [
          "target_language"
        ],
        "type": "object"
      },
      "ForumTranslationResult": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "description": "نص عادي مترجم. اعرضه باستخدام textContent، وليس HTML مطلقًا.",
            "type": "string"
          },
          "cached": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          },
          "source_language": {
            "description": "لغة المصدر المكتشفة التي يبلغ عنها DeepL.",
            "type": "string"
          },
          "target_language": {
            "description": "لغة هدف الموفّر المختارة.",
            "type": "string"
          },
          "title": {
            "description": "عنوان الموضوع المترجم؛ فارغ للردود.",
            "type": "string"
          }
        },
        "required": [
          "title",
          "body",
          "source_language",
          "target_language",
          "cached",
          "provider"
        ],
        "type": "object"
      },
      "Health": {
        "additionalProperties": false,
        "properties": {
          "status": {
            "enum": [
              "ok",
              "ready"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "ID": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "Invite": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "read_only"
            ],
            "type": "string"
          }
        },
        "required": [
          "email",
          "name",
          "role"
        ],
        "type": "object"
      },
      "Invited": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "message"
        ],
        "type": "object"
      },
      "Invoice": {
        "additionalProperties": false,
        "properties": {
          "active_devices": {
            "description": "عدد الأجهزة المجمد للفوترة من ذروة إشغال الفترة الافتراضية. ليس هذا الإشغال الحالي ولا قائمة استخدام أجهزة تراكمية.",
            "type": "integer"
          },
          "base_covered": {
            "description": "ما إذا كانت الحزمة المشتراة تغطي الرسم الأساسي بالفعل.",
            "type": "boolean"
          },
          "base_micros": {
            "description": "الرسم الأساسي بأجزاء المليون من وحدة العملة.",
            "type": "integer"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "finalized_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لاعتماد الفاتورة نهائيًا، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لاعتماد الفاتورة نهائيًا، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لاعتماد الفاتورة نهائيًا، أو null."
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "included_devices": {
            "description": "حصة الأجهزة النشطة المضمنة.",
            "type": "integer"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "overage_devices": {
            "description": "الأجهزة التي تتجاوز الحصة المضمنة.",
            "type": "integer"
          },
          "paid_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لدفع الفاتورة، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لدفع الفاتورة، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لدفع الفاتورة، أو null."
          },
          "payment_mode": {
            "description": "بيئة الدفع، sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "plan_name": {
            "description": "اسم عرض الخطة.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "refunded_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لاسترداد الفاتورة، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لاسترداد الفاتورة، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لاسترداد الفاتورة، أو null."
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "draft",
              "finalized",
              "void"
            ],
            "type": "string"
          },
          "total_cents": {
            "description": "إجمالي الفاتورة بأجزاء المئة؛ راجع paid_at لحالة الدفع.",
            "type": "integer"
          },
          "total_micros": {
            "description": "إجمالي الفاتورة بأجزاء المليون من وحدة العملة.",
            "type": "integer"
          },
          "unit_micros": {
            "description": "سعر كل جهاز نشط زائد بأجزاء المليون.",
            "type": "integer"
          },
          "voided_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لإلغاء الفاتورة، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لإلغاء الفاتورة، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لإلغاء الفاتورة، أو null."
          }
        },
        "required": [
          "id",
          "month",
          "currency",
          "status",
          "total_cents"
        ],
        "type": "object"
      },
      "InvoiceList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "Key": {
        "additionalProperties": false,
        "properties": {
          "allow_http": {
            "description": "السماح لهذا المفتاح بتسجيل أصول مواقع Launch عبر HTTP أو تحديثها، بما فيها نطاقات خوادم الاختبار وعناوين IP الخاصة وأسماء المضيفين الداخلية. تظل طلبات API الخاصة بـ Licentivo تستخدم HTTPS.",
            "type": "boolean"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "type": "string"
          },
          "prefix": {
            "description": "أول 14 محرفًا من مفتاح الإدارة؛ للتعرف فقط.",
            "type": "string"
          },
          "revoked": {
            "description": "ما إذا أُلغي؛ افحص expires_at أيضًا لمعرفة الانتهاء.",
            "type": "boolean"
          },
          "scope": {
            "description": "تسمح read بالقراءة؛ وتسمح write بالقراءة والكتابة. تتطلب الكتابة أيضًا منشئًا Owner نشطًا.",
            "enum": [
              "read",
              "write"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "prefix",
          "scope",
          "revoked",
          "allow_http"
        ],
        "type": "object"
      },
      "KeyBundle": {
        "additionalProperties": false,
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/SigningKey"
            },
            "type": "array"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "runtime_policy_source": {
            "const": "current_license_policy",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "keys"
        ],
        "type": "object"
      },
      "KeyCreate": {
        "additionalProperties": false,
        "properties": {
          "allow_http": {
            "default": false,
            "description": "السماح لهذا المفتاح بتسجيل أصول مواقع Launch عبر HTTP أو تحديثها، بما فيها نطاقات خوادم الاختبار وعناوين IP الخاصة وأسماء المضيفين الداخلية. تظل طلبات API الخاصة بـ Licentivo تستخدم HTTPS.",
            "type": "boolean"
          },
          "expires_days": {
            "description": "الأيام من الإنشاء حتى الانتهاء، 1–365.",
            "maximum": 365,
            "minimum": 1,
            "type": "integer"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "scope": {
            "description": "تسمح read بالقراءة؛ وتسمح write بالقراءة والكتابة. تتطلب الكتابة أيضًا منشئًا Owner نشطًا.",
            "enum": [
              "read",
              "write"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "scope",
          "expires_days"
        ],
        "type": "object"
      },
      "KeyList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Key"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "KeyRotated": {
        "additionalProperties": false,
        "example": {
          "id": "33333333-3333-4333-8333-333333333333",
          "key": "lv_api_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
          "prefix": "lv_api_BBBBBBB"
        },
        "properties": {
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "description": "Full secret returned on creation or rotation. Owners may also view saved license keys on demand in a browser session. Store privately; the prefix cannot authenticate.",
            "type": "string"
          },
          "prefix": {
            "description": "أول 14 محرفًا من مفتاح الإدارة؛ للتعرف فقط.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "prefix"
        ],
        "type": "object"
      },
      "KeySecret": {
        "additionalProperties": false,
        "example": {
          "expires_at": "2027-01-16T00:00:00Z",
          "id": "33333333-3333-4333-8333-333333333333",
          "key": "lv_api_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
          "prefix": "lv_api_AAAAAAA"
        },
        "properties": {
          "allow_http": {
            "description": "السماح لهذا المفتاح بتسجيل أصول مواقع Launch عبر HTTP أو تحديثها، بما فيها نطاقات خوادم الاختبار وعناوين IP الخاصة وأسماء المضيفين الداخلية. تظل طلبات API الخاصة بـ Licentivo تستخدم HTTPS.",
            "type": "boolean"
          },
          "expires_at": {
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "description": "يُعرض فقط عند الإنشاء/التدوير",
            "type": "string"
          },
          "prefix": {
            "description": "أول 14 محرفًا من مفتاح الإدارة؛ للتعرف فقط.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "prefix"
        ],
        "type": "object"
      },
      "KeyUpdate": {
        "additionalProperties": false,
        "properties": {
          "allow_http": {
            "description": "السماح لهذا المفتاح بتسجيل أصول مواقع Launch عبر HTTP أو تحديثها، بما فيها نطاقات خوادم الاختبار وعناوين IP الخاصة وأسماء المضيفين الداخلية. تظل طلبات API الخاصة بـ Licentivo تستخدم HTTPS.",
            "type": "boolean"
          }
        },
        "required": [
          "allow_http"
        ],
        "type": "object"
      },
      "KeyUpdated": {
        "additionalProperties": false,
        "properties": {
          "allow_http": {
            "description": "السماح لهذا المفتاح بتسجيل أصول مواقع Launch عبر HTTP أو تحديثها، بما فيها نطاقات خوادم الاختبار وعناوين IP الخاصة وأسماء المضيفين الداخلية. تظل طلبات API الخاصة بـ Licentivo تستخدم HTTPS.",
            "type": "boolean"
          },
          "id": {
            "description": "Unique record identifier.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "allow_http"
        ],
        "type": "object"
      },
      "LaunchCommerceEvent": {
        "additionalProperties": false,
        "properties": {
          "account_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "entitlement_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "event_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "launch_product_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "legacy_license_id": {
            "description": "فقط لـ entitlement.migrated. تُحفظ سجلات الترخيص الحالي وانتهائه وقدراته وأجهزته؛ وتفقد المفاتيح القديمة وبيانات الأجهزة الوصول وقت التشغيل.",
            "format": "uuid",
            "type": "string"
          },
          "plan_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "type": {
            "description": "نوع حدث تجاري ذي لقطة كاملة وإصدار.",
            "enum": [
              "entitlement.created",
              "entitlement.renewed",
              "entitlement.upgraded",
              "entitlement.downgraded",
              "entitlement.refunded",
              "entitlement.suspended",
              "entitlement.expired",
              "entitlement.resumed",
              "entitlement.migrated"
            ],
            "type": "string"
          },
          "valid_from": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "valid_until": {
            "anyOf": [
              {
                "description": "وقت إنشاء السجل بتوقيت UTC.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء الشراء المطلق بتوقيت UTC؛ تكون null فقط لسياسة perpetual.",
                "type": "null"
              }
            ],
            "description": "انتهاء الشراء المطلق بتوقيت UTC؛ تكون null فقط لسياسة perpetual."
          },
          "version": {
            "description": "إصدار لقطة كاملة متزايد رتيبًا لمرجع الاستحقاق هذا، وليس رقم محاولة تسليم.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "event_id",
          "environment",
          "type",
          "entitlement_ref",
          "account_ref",
          "launch_product_id",
          "plan_ref",
          "version",
          "valid_from"
        ],
        "type": "object"
      },
      "LaunchConnection": {
        "additionalProperties": false,
        "properties": {
          "audience": {
            "description": "المستلم المقصود الدقيق لتأكيدات دخول Launch.",
            "type": "string"
          },
          "created_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
            "type": "boolean"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "heartbeat_seconds": {
            "description": "فاصل التحقق عبر الإنترنت الذي يختاره الخادم بالثواني.",
            "type": "integer"
          },
          "id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "issuer": {
            "description": "مصدر Launch الموثوق الدقيق.",
            "type": "string"
          },
          "offline_seconds": {
            "description": "فاصل عدم الاتصال المحدود المسموح بالثواني؛ يتطلب الصفر التحقق عبر الإنترنت.",
            "type": "integer"
          },
          "session_seconds": {
            "description": "الحد الأقصى لعمر جلسة الترخيص بالثواني.",
            "type": "integer"
          },
          "updated_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "issuer",
          "audience",
          "environment",
          "enabled"
        ],
        "type": "object"
      },
      "LaunchConnectionInput": {
        "additionalProperties": false,
        "properties": {
          "audience": {
            "description": "المستلم المقصود الدقيق لتأكيدات دخول Launch.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
            "type": "boolean"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "heartbeat_seconds": {
            "default": 600,
            "description": "فاصل التحقق عبر الإنترنت الذي يختاره الخادم بالثواني.",
            "maximum": 86400,
            "minimum": 600,
            "type": "integer"
          },
          "issuer": {
            "description": "مصدر Launch الموثوق الدقيق دون مسار أو شرطة مائلة أخيرة. HTTPS هو الافتراضي. يتطلب HTTP القيمة allow_http على مفتاح API الذي ينشئ هذا الطلب؛ وتُدعم عناوين IP الخاصة وأسماء المضيف الداخلية. لا يُرسل طلب رد اتصال أو اكتشاف إلى هذا المصدر.",
            "format": "uri",
            "type": "string"
          },
          "offline_seconds": {
            "default": 0,
            "description": "تتطلب القيمة 0 التحقق عبر الإنترنت. يجب ألا تقل مدة العمل الموجبة دون اتصال عن 3 × heartbeat_seconds. منح الحسابات الدائمة دون اتصال معطّلة.",
            "maximum": 86400,
            "minimum": 0,
            "type": "integer"
          },
          "public_keys": {
            "additionalProperties": {
              "description": "مفتاح Ed25519 عام قياسي مثبت بصيغة Base64URL، 32 بايت.",
              "type": "string"
            },
            "description": "المجموعة الكاملة المثبتة لمفاتيح Launch Ed25519 العامة المفهرسة بمعرّف المفتاح.",
            "maxProperties": 16,
            "minProperties": 1,
            "type": "object"
          },
          "session_seconds": {
            "default": 86400,
            "description": "بحد أدنى 3 × heartbeat_seconds.",
            "maximum": 2592000,
            "minimum": 1800,
            "type": "integer"
          }
        },
        "required": [
          "issuer",
          "audience",
          "environment",
          "public_keys",
          "enabled"
        ],
        "type": "object"
      },
      "LaunchDeviceReleaseInput": {
        "additionalProperties": false,
        "properties": {
          "account_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "entitlement_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "expected_generation": {
            "description": "جيل ربط الجهاز المتوقع، ويُقارن داخل معاملة الإلغاء.",
            "minimum": 1,
            "type": "integer"
          },
          "operation_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "operation_id",
          "account_ref",
          "entitlement_ref",
          "environment",
          "expected_generation"
        ],
        "type": "object"
      },
      "LaunchEvent": {
        "additionalProperties": false,
        "properties": {
          "applied_at": {
            "anyOf": [
              {
                "description": "وقت إنشاء السجل بتوقيت UTC.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "وقت تطبيق اللقطة أو تصنيفها قديمة.",
                "type": "null"
              }
            ],
            "description": "وقت تطبيق اللقطة أو تصنيفها قديمة."
          },
          "attempts": {
            "description": "عدد محاولات المعالجة الفاشلة التي يحتفظ بها Licentivo.",
            "type": "integer"
          },
          "available_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "connection_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "error_code": {
            "description": "سبب معالجة أو مراجعة ثابت؛ فارغ بعد النجاح.",
            "type": "string"
          },
          "event_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "حالة دورة الحياة أو المعالجة الحالية التي يملكها الخادم.",
            "enum": [
              "pending",
              "applied",
              "stale",
              "manual_review"
            ],
            "type": "string"
          }
        },
        "required": [
          "connection_id",
          "event_id",
          "status",
          "attempts",
          "available_at"
        ],
        "type": "object"
      },
      "LaunchExchangeInput": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "data.activation_id من آخر تفعيل ناجح. مطلوب للتحقق وضربات القلب وconsume وإلغاء التفعيل؛ لا يُحذف إلا في activate الأول.",
            "format": "uuid",
            "type": "string"
          },
          "app_version": {
            "description": "إصدار التطبيق الحالي، major.minor.patch، مثل 1.0.0. مطلوب لقواعد الصيانة أو نطاق الإصدار. لا تبلغ خطأ عن تطبيق أحدث باعتباره إصدارًا أقدم.",
            "pattern": "^$|^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$",
            "type": "string"
          },
          "device_id": {
            "description": "SHA-256 من 64 محرفًا سداسيًا عشريًا صغيرًا يحسبه SDK من هوية المنتج والنظام والأجهزة. لا تستبدله بقيمة ثابتة.",
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "device_name": {
            "description": "اسم العرض في لوحة التحكم، حتى 120 محرفًا. لا يحدد هوية الجهاز.",
            "maxLength": 120,
            "type": "string"
          },
          "device_profile": {
            "$ref": "#/components/schemas/DeviceProfile",
            "description": "ملف الجهاز الذي ينشئه SDK. قدّمه حسب متطلبات السياسات لهوية الأجهزة أو رفض VM أو ترحيل الأجهزة."
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "feature": {
            "description": "معرّف الميزة المستهلكة.",
            "maxLength": 64,
            "type": "string"
          },
          "identity_token": {
            "description": "JWT لهوية Launch من نوع Ed25519 ومحدد النوع وأحادي الاستخدام؛ لا تُوثق أي مطالبات استحقاق كحقوق شراء.",
            "maxLength": 12288,
            "type": "string",
            "writeOnly": true
          },
          "launch_connection_id": {
            "description": "launch connection id لعملية ترخيص Launch هذه.",
            "format": "uuid",
            "type": "string"
          },
          "license_key": {
            "const": "",
            "description": "احذفه أو اتركه فارغًا. لا يستخدم تبادل الحساب مفتاح ترخيص طويل الأجل مطلقًا.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج؛ يجب أن يطابق منتج الترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "quantity": {
            "description": "الوحدات المطلوبة لهذه العملية، عدد صحيح 1–1000000000.",
            "maximum": 1000000000,
            "minimum": 1,
            "type": "integer"
          },
          "request_logout_ticket": {
            "description": "التفاوض على قدرات SDK. اطلب تذكرة خروج خاصة بفك الربط عندما لا تكون هناك تذكرة محفوظة للربط الحالي. احذفها عند وجود تذكرة خروج صالحة محفوظة؛ وتتجنب ضربات القلب في الحالة المستقرة بحثًا إضافيًا عن التذكرة.",
            "type": "boolean"
          },
          "reservation_id": {
            "description": "معرّف الحجز؛ أرسل هذه القيمة للاعتماد أو الإلغاء.",
            "format": "uuid",
            "type": "string"
          },
          "reservation_seconds": {
            "default": 900,
            "description": "عمر الحجز الاختياري، 30–3600 ثانية؛ الافتراضي 900. ينتهي مبكرًا عند إعادة ضبط الفترة.",
            "maximum": 3600,
            "minimum": 30,
            "type": "integer"
          },
          "session_id": {
            "description": "مطلوب للتراخيص العائمة: أنشئ UUID لكل مثيل يعمل وأعد استخدامه لطلبات ذلك المثيل. اختياري للتراخيص المرتبطة بالجهاز.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "device_id",
          "identity_token",
          "launch_connection_id",
          "environment"
        ],
        "type": "object"
      },
      "LaunchPlanMappingInput": {
        "additionalProperties": false,
        "properties": {
          "launch_product_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "policy_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "policy_version": {
            "description": "الإصدار الحالي المتوقع لسياسة الترخيص المعينة.",
            "minimum": 1,
            "type": "integer"
          },
          "product_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "launch_product_id",
          "product_id",
          "policy_id",
          "policy_version"
        ],
        "type": "object"
      },
      "LaunchSessionRevocation": {
        "additionalProperties": false,
        "properties": {
          "account_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "completed_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "connection_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "description": "وقت إنشاء السجل بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "event_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "description": "سبب تدقيق اختياري؛ القيمة الفارغة تكافئ الإغفال. يتطلب forced_logout نطاق session؛ ويتطلب password_changed وaccount_disabled نطاق account.",
            "enum": [
              "",
              "forced_logout",
              "password_changed",
              "account_disabled"
            ],
            "type": "string"
          },
          "released_devices": {
            "description": "أجيال ربط الأجهزة الحالية المحررة؛ تُحفظ عمليات الدخول الأحدث.",
            "minimum": 0,
            "type": "integer"
          },
          "revoked_before": {
            "description": "موجود لنطاق account. يجب أن يكون auth_time للمصادقة الجديدة أكبر تمامًا من حد UTC هذا، بالمقارنة بدقة ثانية Unix. تظل قيم sid المعروفة سابقًا ملغاة نهائيًا.",
            "format": "date-time",
            "type": "string"
          },
          "revoked_credentials": {
            "description": "بيانات الأجهزة التي أُلغيَت حديثًا بالحدث الأصلي.",
            "minimum": 0,
            "type": "integer"
          },
          "revoked_sessions": {
            "description": "جلسات الترخيص التي أُلغيَت حديثًا بالحدث الأصلي.",
            "minimum": 0,
            "type": "integer"
          },
          "scope": {
            "description": "تلغي session معرّف sid واحدًا في Launch عبر جميع المنتجات والأجهزة في هذا الاتصال؛ وتلغي account جميع جلسات الحساب الحالية وترفض تأكيدات المصادقة القديمة.",
            "enum": [
              "session",
              "account"
            ],
            "type": "string"
          },
          "sid": {
            "description": "مطلوب وغير فارغ لنطاق session؛ احذفه أو اتركه فارغًا لنطاق account. هذا sid تسجيل دخول Launch وليس جلسة ترخيص Licentivo أو معرّف جهاز.",
            "pattern": "^[A-Za-z0-9_-]{0,128}$",
            "type": "string"
          },
          "status": {
            "const": "succeeded",
            "description": "حالة دورة الحياة أو المعالجة الحالية التي يملكها الخادم.",
            "type": "string"
          }
        },
        "required": [
          "connection_id",
          "event_id",
          "environment",
          "account_ref",
          "scope",
          "status",
          "revoked_sessions",
          "revoked_credentials",
          "released_devices",
          "created_at",
          "completed_at"
        ],
        "type": "object"
      },
      "LaunchSessionRevocationInput": {
        "additionalProperties": false,
        "oneOf": [
          {
            "properties": {
              "reason": {
                "enum": [
                  "",
                  "forced_logout"
                ]
              },
              "scope": {
                "const": "session"
              },
              "sid": {
                "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
                "pattern": "^[A-Za-z0-9_-]{1,128}$",
                "type": "string"
              }
            },
            "required": [
              "sid"
            ]
          },
          {
            "properties": {
              "reason": {
                "enum": [
                  "",
                  "password_changed",
                  "account_disabled"
                ]
              },
              "scope": {
                "const": "account"
              },
              "sid": {
                "const": ""
              }
            }
          }
        ],
        "properties": {
          "account_ref": {
            "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "description": "فحص اتساق اختياري. احذفه أو اتركه فارغًا لاستخدام بيئة الاتصال؛ يجب أن تطابق القيمة غير الفارغة البيئة. لا يغير هذا الحقل الفوترة ولا يوفر اختبار ترخيص مجانيًا.",
            "enum": [
              "",
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "event_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "description": "سبب تدقيق اختياري؛ القيمة الفارغة تكافئ الإغفال. يتطلب forced_logout نطاق session؛ ويتطلب password_changed وaccount_disabled نطاق account.",
            "enum": [
              "",
              "forced_logout",
              "password_changed",
              "account_disabled"
            ],
            "type": "string"
          },
          "scope": {
            "description": "تلغي session معرّف sid واحدًا في Launch عبر جميع المنتجات والأجهزة في هذا الاتصال؛ وتلغي account جميع جلسات الحساب الحالية وترفض تأكيدات المصادقة القديمة.",
            "enum": [
              "session",
              "account"
            ],
            "type": "string"
          },
          "sid": {
            "description": "مطلوب وغير فارغ لنطاق session؛ احذفه أو اتركه فارغًا لنطاق account. هذا sid تسجيل دخول Launch وليس جلسة ترخيص Licentivo أو معرّف جهاز.",
            "pattern": "^[A-Za-z0-9_-]{0,128}$",
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "account_ref",
          "scope"
        ],
        "type": "object"
      },
      "Lease": {
        "additionalProperties": false,
        "properties": {
          "key_id": {
            "description": "UUID مفتاح التوقيع العام؛ يجب أن يوجد في trusted_keys الخاص بالمنتج.",
            "format": "uuid",
            "type": "string"
          },
          "payload": {
            "description": "Base64URL دون حشو لبايتات JSON الترخيص الأصلية. فك الترميز للقراءة فقط؛ والتحقق من التوقيع مطلوب.",
            "type": "string"
          },
          "signature": {
            "description": "توقيع Ed25519 بصيغة Base64URL. تحقق من النص LicenovaLease/v1 وسطر جديد واحد وبايتات JSON الحمولة الأصلية المفكوكة. لا تعد تسلسل JSON. التوقيع المفكوك 64 بايت.",
            "type": "string"
          },
          "version": {
            "const": 1,
            "description": "إصدار بروتوكول غلاف التوقيع، حاليًا 1.",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "key_id",
          "payload",
          "signature"
        ],
        "type": "object"
      },
      "LeaseClaims": {
        "additionalProperties": false,
        "description": "فك ترميز بايتات الحمولة الأصلية الموقعة. دون runtime_policy يُحد TTL عند 86400 ثانية؛ وإلا تُطبق السياسة الموقعة. لا تثق بالحمولة مطلقًا دون التحقق من التوقيع/السياق.",
        "properties": {
          "activation_id": {
            "format": "uuid",
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/SignedCapabilities"
          },
          "device_id": {
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "expires_at": {
            "maximum": 253402300799,
            "type": "integer"
          },
          "features": {
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "issued_at": {
            "type": "integer"
          },
          "key_id": {
            "format": "uuid",
            "type": "string"
          },
          "license_id": {
            "format": "uuid",
            "type": "string"
          },
          "max_devices": {
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "offline_request_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "runtime_policy": {
            "$ref": "#/components/schemas/RuntimePolicy"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "const": 1,
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "LegalAcceptance": {
        "additionalProperties": false,
        "properties": {
          "accepted_at": {
            "format": "date-time",
            "type": "string"
          },
          "api_overage_accepted": {
            "type": "boolean"
          },
          "device_overage_accepted": {
            "type": "boolean"
          },
          "digest": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "overage_accepted": {
            "type": "boolean"
          },
          "price_version": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "LegalAcceptanceList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LegalAcceptance"
            },
            "type": "array"
          },
          "now": {
            "format": "date-time",
            "type": "string"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "LegalConsent": {
        "additionalProperties": false,
        "properties": {
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "License": {
        "additionalProperties": false,
        "description": "يكون الانتهاء null حتى أول تفعيل ناجح. تُثبت المدة عند الإصدار؛ ولا يعيد التفعيل ضبطها مطلقًا.",
        "example": {
          "created_at": "2026-10-18T00:00:00Z",
          "customer": "Order #1001",
          "duration_days": 30,
          "expires_at": null,
          "features": [
            "export"
          ],
          "first_activated_at": null,
          "id": "33333333-3333-4333-8333-333333333333",
          "key_prefix": "lv_lic_AAAAAAA",
          "max_devices": 1,
          "mode": "timed",
          "policy_id": "22222222-2222-4222-8222-222222222222",
          "policy_version": 1,
          "product_id": "11111111-1111-4111-8111-111111111111",
          "status": "active",
          "updated_at": "2026-10-18T00:00:00Z"
        },
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "customer": {
            "description": "تسمية عميل يحددها المورّد، مختلفة عن بريد بوابة العميل.",
            "type": "string"
          },
          "duration_days": {
            "description": "أيام كل ترخيص منذ أول تفعيل. يلزم 1–36500 لإصدار timed/trial؛ وغائبة/null لـ perpetual. لا تُخزن في السياسة مطلقًا.",
            "type": [
              "integer",
              "null"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "type": "null"
              }
            ],
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد."
          },
          "features": {
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "first_activated_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل."
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "key_prefix": {
            "description": "بادئة قصيرة لمفتاح الترخيص للتعرف/البحث، لا للمصادقة.",
            "type": "string"
          },
          "max_devices": {
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "policy_id": {
            "description": "UUID السياسة؛ يجب أن تنتمي إلى المنتج عند الإصدار.",
            "format": "uuid",
            "type": "string"
          },
          "policy_version": {
            "description": "مراجعة السياسة؛ أرسل القيمة الحالية عند تعديل القدرات الكاملة لمنع الكتابة القديمة.",
            "type": "integer"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "active",
              "expired",
              "suspended",
              "revoked"
            ],
            "type": "string"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "product_id",
          "key_prefix",
          "mode",
          "status"
        ],
        "type": "object"
      },
      "LicenseCapabilities": {
        "additionalProperties": false,
        "example": {
          "license_id": "33333333-3333-4333-8333-333333333333",
          "license_model": "node_locked",
          "maintenance_days": 0,
          "maintenance_until": null,
          "max_version": "",
          "min_version": "",
          "product_id": "11111111-1111-4111-8111-111111111111",
          "updated_at": "2026-10-18T00:00:00Z"
        },
        "properties": {
          "license_id": {
            "description": "UUID الترخيص، وهو مختلف عن السر lv_lic_.",
            "format": "uuid",
            "type": "string"
          },
          "license_model": {
            "description": "ربط جهاز node_locked أو مقاعد floating.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "maintenance_days": {
            "description": "أيام الصيانة منذ أول تفعيل؛ يعني 0 عدم وجود حد لانتهاء الصيانة.",
            "type": "integer"
          },
          "maintenance_until": {
            "anyOf": [
              {
                "description": "موعد انتهاء الصيانة للإصدارات الجديدة؛ قد يكون null قبل التفعيل أو عند عدم وجود حد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "موعد انتهاء الصيانة للإصدارات الجديدة؛ قد يكون null قبل التفعيل أو عند عدم وجود حد.",
                "type": "null"
              }
            ],
            "description": "موعد انتهاء الصيانة للإصدارات الجديدة؛ قد يكون null قبل التفعيل أو عند عدم وجود حد."
          },
          "max_version": {
            "description": "الحد الأعلى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أعلى.",
            "type": "string"
          },
          "min_version": {
            "description": "الحد الأدنى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أدنى.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "license_id",
          "product_id",
          "license_model",
          "maintenance_days",
          "maintenance_until",
          "min_version",
          "max_version",
          "updated_at"
        ],
        "type": "object"
      },
      "LicenseCapabilityResult": {
        "additionalProperties": false,
        "example": {
          "customer_email": "buyer@example.com",
          "license": {
            "license_id": "33333333-3333-4333-8333-333333333333",
            "license_model": "node_locked",
            "maintenance_days": 0,
            "maintenance_until": null,
            "max_version": "",
            "min_version": "",
            "product_id": "11111111-1111-4111-8111-111111111111",
            "updated_at": "2026-10-18T00:00:00Z"
          },
          "meter_rules": [],
          "usage": null
        },
        "properties": {
          "customer_email": {
            "description": "بريد بوابة العميل المرتبط؛ فارغ عند عدم التعيين.",
            "type": "string"
          },
          "license": {
            "$ref": "#/components/schemas/LicenseCapabilities",
            "description": "لقطة قدرات الترخيص."
          },
          "meter_rules": {
            "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "allow_overage": {
                  "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                  "type": "boolean"
                },
                "feature": {
                  "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                  "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                "limit": {
                  "description": "مرات استخدام الميزة المضمنة لكل فترة قياس (ليست حد التقسيم إلى صفحات).",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "max_overage": {
                  "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "period": {
                  "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                  "enum": [
                    "month",
                    "day",
                    "lifetime"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "feature",
                "limit",
                "period"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "usage": {
            "anyOf": [
              {
                "description": "سجلات استخدام الميزات الفعلية؛ قد تكون null عند خلوها.",
                "items": {
                  "$ref": "#/components/schemas/FeatureUsage"
                },
                "type": "array"
              },
              {
                "description": "سجلات استخدام الميزات الفعلية؛ قد تكون null عند خلوها.",
                "type": "null"
              }
            ],
            "description": "سجلات استخدام الميزات الفعلية؛ قد تكون null عند خلوها."
          }
        },
        "required": [],
        "type": "object"
      },
      "LicenseCreate": {
        "additionalProperties": false,
        "description": "إصدار ترخيص بقيمة duration_days الخاصة به. تتطلب تراخيص timed/trial من 1–36500 يومًا؛ وتتطلب تراخيص perpetual غياب القيمة/null. يبدأ العد عند أول تفعيل ناجح.",
        "properties": {
          "customer": {
            "description": "اسم العميل أو مرجع الطلب للبحث في لوحة التحكم، حتى 254 محرفًا.",
            "maxLength": 254,
            "type": "string"
          },
          "customer_email": {
            "description": "بريد بوابة العميل المرتبط؛ فارغ عند عدم التعيين.",
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "duration_days": {
            "description": "مدة الترخيص بالأيام، وتبدأ عند أول تفعيل ناجح. مطلوبة لإصدار timed/trial؛ تُحذف أو تكون null للتراخيص perpetual. لا تُورث من السياسة مطلقًا.",
            "maximum": 36500,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "policy_id": {
            "description": "UUID سياسة ترخيص تنتمي إلى هذا المنتج.",
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "description": "معرّف المنتج (UUID).",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "policy_id"
        ],
        "type": "object"
      },
      "LicenseKeyReveal": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "description": "Original full license key, revealed only to a current Owner session.",
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "key_prefix"
        ],
        "type": "object"
      },
      "LicenseList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/License"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "LicenseSecret": {
        "additionalProperties": false,
        "example": {
          "duration_days": 30,
          "expires_at": null,
          "first_activated_at": null,
          "id": "33333333-3333-4333-8333-333333333333",
          "key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
          "key_prefix": "lv_lic_AAAAAAA"
        },
        "properties": {
          "duration_days": {
            "description": "الأيام الصالحة منذ أول تفعيل؛ null للتراخيص perpetual.",
            "type": [
              "integer",
              "null"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "type": "null"
              }
            ],
            "description": "انتهاء الترخيص النهائي، UTC ISO 8601؛ null قبل أول تفعيل وللتراخيص perpetual."
          },
          "first_activated_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لأول تفعيل ناجح؛ null قبل التفعيل ولا يتغير بالتجديد أو النقل.",
                "type": "null"
              }
            ],
            "description": "أول تفعيل ناجح، UTC ISO 8601؛ null قبل التفعيل. لا يعيد نقل الجهاز ضبطه."
          },
          "id": {
            "description": "UUID سجل الترخيص لاستعلامات الإدارة أو التجديد أو الإلغاء. ليس مفتاح تفعيل.",
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "description": "مفتاح الترخيص الكامل الذي يبدأ بـ lv_lic_. يُعرض مرة واحدة عند الإصدار؛ ويجب على المورّد حفظه بسرية وتسليمه للعميل.",
            "type": "string"
          },
          "key_prefix": {
            "description": "بادئة المفتاح للتعرف في لوحة التحكم؛ لا يمكنها تفعيل ترخيص.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "key_prefix"
        ],
        "type": "object"
      },
      "LicenseUpdate": {
        "additionalProperties": false,
        "properties": {
          "customer": {
            "description": "تسمية عميل يحددها المورّد، مختلفة عن بريد بوابة العميل.",
            "maxLength": 254,
            "type": "string"
          },
          "features": {
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "max_devices": {
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "policy_id": {
            "description": "تبديل هذا الترخيص إلى سياسة للمنتج نفسه. يتطلب تغيير السياسة preview_token صالحًا؛ مع الحفاظ على مفتاح الترخيص والمدة الأصلية والاستخدام.",
            "format": "uuid",
            "type": "string"
          },
          "preview_token": {
            "description": "الرمز الذي يعيده POST /licenses/policy-preview لهذا الترخيص والسياسة المستهدفة.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "active",
              "suspended",
              "revoked"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "LicensingWebhook": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كان HTTP مسموحًا، للتطوير المحلي فقط.",
            "type": "boolean"
          },
          "events": {
            "description": "أنواع أحداث مشتركة غير فارغة ومتميزة.",
            "items": {
              "enum": [
                "license.created",
                "license.updated",
                "license.renewed",
                "license.revoked",
                "license.activate",
                "license.deactivate",
                "license.consume",
                "license.expiring",
                "license.expired",
                "license.maintenance_expiring",
                "license.maintenance_expired"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "type": "string"
          },
          "updated_at": {
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "عنوان URL لمستقبل الحدث؛ استخدم HTTPS عامًا في الإنتاج.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "events",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "LicensingWebhookInput": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "description": "ما إذا كانت واجهة webhook مفعلة.",
            "type": "boolean"
          },
          "events": {
            "description": "أنواع أحداث مشتركة غير فارغة ومتميزة.",
            "items": {
              "enum": [
                "license.created",
                "license.updated",
                "license.renewed",
                "license.revoked",
                "license.activate",
                "license.deactivate",
                "license.consume",
                "license.expiring",
                "license.expired",
                "license.maintenance_expiring",
                "license.maintenance_expired"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "type": "string"
          },
          "secret": {
            "description": "سر التحقق من webhook، من 32–200 محرف عند تقديمه؛ يحافظ حذفه عند التحديث عليه. يعني الخرج الفارغ أنه لم يُصدر مجددًا.",
            "maxLength": 200,
            "minLength": 32,
            "type": "string",
            "writeOnly": true
          },
          "url": {
            "description": "عنوان URL لمستقبل الحدث؛ استخدم HTTPS عامًا في الإنتاج.",
            "format": "uri",
            "maxLength": 2000,
            "type": "string"
          }
        },
        "required": [
          "name",
          "url",
          "events",
          "enabled"
        ],
        "type": "object"
      },
      "LicensingWebhookList": {
        "additionalProperties": false,
        "properties": {
          "event_types": {
            "description": "جميع أنواع أحداث الترخيص المدعومة.",
            "items": {
              "enum": [
                "license.created",
                "license.updated",
                "license.renewed",
                "license.revoked",
                "license.activate",
                "license.deactivate",
                "license.consume",
                "license.expiring",
                "license.expired",
                "license.maintenance_expiring",
                "license.maintenance_expired"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/LicensingWebhook"
            },
            "type": "array"
          }
        },
        "required": [],
        "type": "object"
      },
      "LicensingWebhookSecret": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "secret": {
            "description": "يُعاد مرة واحدة للواجهات الجديدة؛ فارغ عند الاحتفاظ به",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "LoggedOut": {
        "additionalProperties": false,
        "properties": {
          "logged_out": {
            "type": "boolean"
          }
        },
        "required": [
          "logged_out"
        ],
        "type": "object"
      },
      "Login": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "description": "12–128 بايت UTF-8، وليس محارف",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "LogoutTicket": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "expected_generation": {
            "description": "جيل ربط الجهاز المتوقع، ويُقارن داخل معاملة الإلغاء.",
            "minimum": 1,
            "type": "integer"
          },
          "operation_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "release_token": {
            "description": "قدرة خاصة بفك الربط. لا تستطيع التفعيل أو التحقق أو التحديث أو استهلاك الميزات. احتفظ بها في سجل خروج SDK فقط أثناء انتظار الإلغاء.",
            "pattern": "^lv_out_[A-Za-z0-9_-]{43}$",
            "type": "string"
          }
        },
        "required": [
          "operation_id",
          "product_id",
          "activation_id",
          "expected_generation",
          "release_token"
        ],
        "type": "object"
      },
      "MailConnection": {
        "additionalProperties": false,
        "properties": {
          "check_status": {
            "enum": [
              "verified",
              "limited"
            ],
            "type": "string"
          },
          "delivery_mode": {
            "enum": [
              "file",
              "smtp",
              "resend",
              "brevo",
              "postmark",
              "mailgun"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "file",
              "smtp",
              "resend",
              "brevo",
              "postmark",
              "mailgun"
            ],
            "type": "string"
          },
          "ok": {
            "description": "False للفحص المحدود: لم تُؤكد بيانات الاعتماد والتسليم.",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "connected"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "mode",
          "delivery_mode",
          "ok",
          "check_status"
        ],
        "type": "object"
      },
      "MailInput": {
        "additionalProperties": false,
        "description": "تحديث جزئي لإعدادات بريد المنصة المشفرة. تُحفظ الحقول المحذوفة وإعدادات الموفّرين الآخرين؛ وتحافظ مفاتيح API وكلمات مرور SMTP الفارغة على الأسرار الحالية. يجب إعداد الخدمة النشطة المحددة بالكامل. وضع الملف غير متاح في الإنتاج. يتطلب جلسة platform-admin ورمز CSRF؛ ولا يمكن لمفاتيح API إدارة المورّد تغيير إعدادات بريد المنصة.",
        "properties": {
          "from": {
            "type": "string"
          },
          "host": {
            "maxLength": 253,
            "type": "string"
          },
          "mode": {
            "enum": [
              "file",
              "smtp",
              "resend",
              "brevo",
              "postmark",
              "mailgun"
            ],
            "type": "string"
          },
          "password": {
            "description": "احذفه أو اتركه فارغًا للاحتفاظ بكلمة مرور SMTP الحالية.",
            "maxLength": 1000,
            "type": "string",
            "writeOnly": true
          },
          "port": {
            "maximum": 65535,
            "minimum": 1,
            "type": "integer"
          },
          "providers": {
            "additionalProperties": false,
            "properties": {
              "brevo": {
                "$ref": "#/components/schemas/MailProviderInput"
              },
              "mailgun": {
                "$ref": "#/components/schemas/MailgunInput"
              },
              "postmark": {
                "$ref": "#/components/schemas/MailProviderInput"
              },
              "resend": {
                "$ref": "#/components/schemas/MailProviderInput"
              }
            },
            "required": [],
            "type": "object"
          },
          "tls_mode": {
            "enum": [
              "starttls",
              "implicit"
            ],
            "type": "string"
          },
          "username": {
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "MailJob": {
        "additionalProperties": false,
        "properties": {
          "attempts": {
            "type": "integer"
          },
          "cancel_reason": {
            "enum": [
              "",
              "platform_disabled",
              "customer_disabled",
              "coverage_changed",
              "reminder_window_changed",
              "renewal_state_changed",
              "purchase_unavailable",
              "workspace_unavailable",
              "recipient_unavailable",
              "unknown_notification"
            ],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "",
              "purchase_success",
              "expiry_reminder",
              "auto_renewal_success",
              "auto_renewal_problem",
              "billing_test"
            ],
            "type": "string"
          },
          "mode": {
            "enum": [
              "",
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "recipient": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "delivered",
              "failed",
              "cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "attempts"
        ],
        "type": "object"
      },
      "MailJobList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MailJob"
            },
            "maxItems": 50,
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "MailProviderInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "مفتاح API للموفّر؛ يستخدم Postmark رمز Server API Token. احذفه أو اتركه فارغًا للاحتفاظ بالسر المحفوظ.",
            "maxLength": 4096,
            "type": "string",
            "writeOnly": true
          },
          "from": {
            "description": "بريد المرسل المتحقق منه؛ مطلوب عند اختيار هذا الموفّر كنشط.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "MailProviderSettings": {
        "additionalProperties": false,
        "properties": {
          "api_key_configured": {
            "type": "boolean"
          },
          "domain": {
            "description": "نطاق إرسال Mailgun؛ فارغ للموفّرين الآخرين.",
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "region": {
            "description": "منطقة Mailgun؛ فارغة للموفّرين الآخرين.",
            "enum": [
              "",
              "us",
              "eu"
            ],
            "type": "string"
          }
        },
        "required": [
          "from",
          "domain",
          "region",
          "api_key_configured"
        ],
        "type": "object"
      },
      "MailQueued": {
        "additionalProperties": false,
        "properties": {
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending"
            ],
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "status"
        ],
        "type": "object"
      },
      "MailSettings": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "file",
              "smtp",
              "resend",
              "brevo",
              "postmark",
              "mailgun"
            ],
            "type": "string"
          },
          "password_configured": {
            "type": "boolean"
          },
          "port": {
            "type": "integer"
          },
          "providers": {
            "additionalProperties": false,
            "properties": {
              "brevo": {
                "$ref": "#/components/schemas/MailProviderSettings"
              },
              "mailgun": {
                "$ref": "#/components/schemas/MailProviderSettings"
              },
              "postmark": {
                "$ref": "#/components/schemas/MailProviderSettings"
              },
              "resend": {
                "$ref": "#/components/schemas/MailProviderSettings"
              }
            },
            "required": [
              "resend",
              "brevo",
              "postmark",
              "mailgun"
            ],
            "type": "object"
          },
          "tls_mode": {
            "enum": [
              "starttls",
              "implicit"
            ],
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "port",
          "password_configured",
          "providers"
        ],
        "type": "object"
      },
      "MailgunInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "مفتاح API لحساب Mailgun أو مفتاح إرسال النطاق. احذفه أو اتركه فارغًا للاحتفاظ بالسر المحفوظ.",
            "maxLength": 4096,
            "type": "string",
            "writeOnly": true
          },
          "domain": {
            "description": "نطاق الإرسال، مطلوب عند نشاط Mailgun؛ دون مخطط أو مسار أو منفذ.",
            "maxLength": 253,
            "type": "string"
          },
          "from": {
            "description": "بريد المرسل المتحقق منه؛ مطلوب عند نشاط Mailgun.",
            "type": "string"
          },
          "region": {
            "default": "us",
            "description": "المنطقة التي تستضيف نطاق الإرسال؛ تستخدم US وEU واجهتي API ثابتتين منفصلتين.",
            "enum": [
              "us",
              "eu"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "ManagementKeyBundle": {
        "additionalProperties": false,
        "properties": {
          "keys": {
            "description": "مفاتيح التوقيع العامة الحالية والتاريخية للمنتج.",
            "items": {
              "$ref": "#/components/schemas/SigningKey"
            },
            "type": "array"
          },
          "product_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "keys"
        ],
        "type": "object"
      },
      "ManualRefundInput": {
        "additionalProperties": false,
        "properties": {
          "customer_agreement": {
            "maxLength": 3000,
            "type": "string"
          },
          "evidence": {
            "maxLength": 3000,
            "type": "string"
          }
        },
        "required": [
          "customer_agreement",
          "evidence"
        ],
        "type": "object"
      },
      "Me": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_platform_admin": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "read_only"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "id",
          "role",
          "is_platform_admin"
        ],
        "type": "object"
      },
      "Member": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_platform_admin": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "read_only"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "role",
          "status",
          "verified"
        ],
        "type": "object"
      },
      "MemberList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "MemberUpdate": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "enum": [
              "owner",
              "read_only"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "MonthInput": {
        "additionalProperties": false,
        "properties": {
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "pattern": "^[0-9]{4}-[0-9]{2}$",
            "type": "string"
          }
        },
        "required": [
          "month"
        ],
        "type": "object"
      },
      "Notice": {
        "additionalProperties": false,
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "OfflineReleaseResult": {
        "additionalProperties": false,
        "example": {
          "activation_id": "44444444-4444-4444-8444-444444444444",
          "deactivated": true
        },
        "properties": {
          "activation_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "deactivated": {
            "description": "ما إذا كان HTTP مسموحًا، للتطوير المحلي فقط.",
            "type": "boolean"
          }
        },
        "required": [
          "activation_id",
          "deactivated"
        ],
        "type": "object"
      },
      "OfflineRequest": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID سجل تفعيل الجهاز أو الجلسة العائمة.",
            "format": "uuid",
            "type": "string"
          },
          "app_version": {
            "description": "فارغ للتفعيل العادي. قدّم إصدار التطبيق المنشور فعليًا فقط عند استخدام قيود الإصدار أو الصيانة.",
            "pattern": "^$|^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "type": "integer"
          },
          "device_id": {
            "description": "يشتق SDK هوية نظام التشغيل والأجهزة ضمن نطاق المنتج باستخدام LicenovaDevice/v3. لا يمكن للإعداد تجاوز الجهاز الحالي.",
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "device_name": {
            "description": "تسمية جهاز مقروءة للبشر، وليست هوية أمنية.",
            "maxLength": 120,
            "type": "string"
          },
          "device_profile": {
            "$ref": "#/components/schemas/DeviceProfile",
            "description": "هوية جهاز ينشئها SDK؛ قدّم جميع الحقول الفرعية المطلوبة عند وجودها."
          },
          "license_key": {
            "description": "مفتاح الترخيص الأصلي؛ رمز lv_tmp_ أحادي الاستخدام لـ activate فقط؛ ثم بيانات اعتماد lv_dev_ المرتبطة بالجهاز لعمليات التشغيل. يحفظ SDK بيانات الاعتماد بصورة مستقلة عن الإيجارات.",
            "pattern": "^lv_(lic|tmp|dev)_[A-Za-z0-9_-]{43}$",
            "type": "string",
            "writeOnly": true
          },
          "operation": {
            "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
            "enum": [
              "activate",
              "deactivate"
            ],
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "format": "uuid",
            "type": "string"
          },
          "session_id": {
            "description": "معرّف جلسة المثيل العائم؛ يمكن حذفه للتراخيص المرتبطة بالعقدة.",
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "const": 1,
            "description": "مراجعة السياسة أو إصدار المنتج major.minor.patch أو إصدار بروتوكول عدم الاتصال 1، حسب الكائن.",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "request_id",
          "created_at",
          "operation",
          "product_id",
          "license_key",
          "device_id"
        ],
        "type": "object"
      },
      "OfflineResponse": {
        "additionalProperties": false,
        "example": {
          "operation": "deactivate",
          "request_id": "55555555-5555-4555-8555-555555555555",
          "result": {
            "activation_id": "44444444-4444-4444-8444-444444444444",
            "deactivated": true
          },
          "version": 1
        },
        "properties": {
          "operation": {
            "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
            "enum": [
              "activate",
              "deactivate"
            ],
            "type": "string"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "format": "uuid",
            "type": "string"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuntimeResult",
                "description": "نتيجة العملية دون اتصال: يعيد التفعيل إيجارًا موقعًا؛ ويعيد التحرير deactivated."
              },
              {
                "$ref": "#/components/schemas/OfflineReleaseResult",
                "description": "نتيجة العملية دون اتصال: يعيد التفعيل إيجارًا موقعًا؛ ويعيد التحرير deactivated."
              }
            ],
            "description": "نتيجة العملية دون اتصال: يعيد التفعيل إيجارًا موقعًا؛ ويعيد التحرير deactivated."
          },
          "version": {
            "const": 1,
            "description": "مراجعة السياسة أو إصدار المنتج major.minor.patch أو إصدار بروتوكول عدم الاتصال 1، حسب الكائن.",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "request_id",
          "operation",
          "result"
        ],
        "type": "object"
      },
      "OnboardingInput": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "description": "وصف المنتج؛ يجوز أن يكون فارغًا.",
            "maxLength": 1000,
            "type": "string"
          },
          "duration_days": {
            "description": "مدة ترخيص الاختبار الناتج فقط؛ الافتراضي 7 لـ timed/trial. لا تُحفظ في السياسة الناتجة.",
            "maximum": 36500,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "features": {
            "default": [
              "export"
            ],
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "يعطل 0 ضربات القلب الدورية صراحة؛ وإلا 600–86400 ثانية (بحد أدنى 10 دقائق). مستقل عن حصة عدم الاتصال.",
            "type": "integer"
          },
          "license_model": {
            "default": "node_locked",
            "description": "ربط جهاز node_locked أو مقاعد floating.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "max_devices": {
            "default": 1,
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "default": "trial",
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "offline_mode": {
            "description": "حصة عدم اتصال limited أو none أو permanent؛ يظل انتهاء الترخيص ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "Limited: من 1–31536000 ثانية وبحد أدنى 3 × heartbeat_seconds عند تفعيل النبضات؛ none/permanent: 0",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "name"
        ],
        "type": "object"
      },
      "OnboardingResult": {
        "additionalProperties": false,
        "example": {
          "config": {
            "allow_http": false,
            "app_version": "1.0.0",
            "base_url": "https://license.example.com",
            "cache_path": "",
            "device_name": "My application",
            "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
            "product_id": "11111111-1111-4111-8111-111111111111",
            "trusted_keys": {
              "66666666-6666-4666-8666-666666666666": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
            }
          },
          "license_id": "33333333-3333-4333-8333-333333333333",
          "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
          "next": "Choose a language and download the configured SDK bundle.",
          "policy_id": "22222222-2222-4222-8222-222222222222",
          "product_id": "11111111-1111-4111-8111-111111111111"
        },
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SDKConfig",
            "description": "إعداد SDK اختبار خاص يحتوي على سر ترخيص."
          },
          "license_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "license_key": {
            "description": "مفتاح ترخيص العميل الكامل المقدم عند التفعيل. لا يحتوي رمز تهيئة المنتج وتنزيلات الأمثلة على هذا السر. تستخدم الطلبات دون اتصال بيانات الاعتماد التي يوفرها SDK.",
            "type": "string"
          },
          "next": {
            "description": "الخطة الافتراضية المجدولة للشهر التالي، أو null.",
            "type": "string"
          },
          "policy_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "policy_id",
          "license_id",
          "license_key",
          "config",
          "next"
        ],
        "type": "object"
      },
      "OperatorProfile": {
        "additionalProperties": false,
        "properties": {
          "backup_region": {
            "maxLength": 500,
            "type": "string"
          },
          "contact": {
            "maxLength": 500,
            "type": "string"
          },
          "country": {
            "maxLength": 500,
            "type": "string"
          },
          "financial_retention_years": {
            "description": "يعني الصفر أو الإغفال عدم التأكيد ولا يُدرج في المستندات العامة.",
            "maximum": 30,
            "minimum": 0,
            "type": "integer"
          },
          "hosting_provider": {
            "maxLength": 500,
            "type": "string"
          },
          "mail_provider": {
            "maxLength": 500,
            "type": "string"
          },
          "markets": {
            "maxLength": 500,
            "type": "string"
          },
          "operator": {
            "maxLength": 500,
            "type": "string"
          },
          "processing_grounds": {
            "maxLength": 500,
            "type": "string"
          },
          "server_region": {
            "maxLength": 500,
            "type": "string"
          },
          "transfer_safeguards": {
            "maxLength": 500,
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "OriginalRefundInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "pattern": "^[0-9]+(?:\\.[0-9]{1,2})?$",
            "type": "string"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "reason",
          "request_id"
        ],
        "type": "object"
      },
      "OriginalRefundResult": {
        "additionalProperties": false,
        "properties": {
          "case_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProviderRefund"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "OveragePlan": {
        "additionalProperties": false,
        "properties": {
          "api_hard_limit": {
            "description": "ما إذا تتوقف استدعاءات التشغيل عند حد حصة API.",
            "type": "boolean"
          },
          "api_unit_micros": {
            "description": "سعر كل استدعاء تشغيل زائد بأجزاء المليون.",
            "minimum": 0,
            "type": "integer"
          },
          "base_micros": {
            "description": "الرسم الأساسي بأجزاء المليون من وحدة العملة.",
            "type": "integer"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "type": "string"
          },
          "description": {
            "description": "وصف عرض الفوترة.",
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كان عرض الفوترة مفعّلًا للشراء.",
            "type": "boolean"
          },
          "hard_limit": {
            "description": "ما إذا تُرفض الأجهزة الجديدة القابلة للفوترة عند حد الحصة.",
            "type": "boolean"
          },
          "included_api_calls": {
            "description": "null = غير محدود؛ 0 = لا استدعاءات ناجحة مضمنة",
            "maximum": 1000000000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "included_devices": {
            "description": "حصة الأجهزة النشطة المضمنة.",
            "type": "integer"
          },
          "name": {
            "description": "اسم عرض عرض الفوترة.",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "public": {
            "description": "ما إذا كان عرض الفوترة مدرجًا للعامة.",
            "type": "boolean"
          },
          "renewal_only": {
            "description": "يمكن للعملاء المدفوعين أو المهدى إليهم الحاليين التجديد مقدمًا أو بعد الانتهاء في البيئة والعملة نفسيهما. مخفي عن المشتريات العامة الجديدة.",
            "type": "boolean"
          },
          "sort_order": {
            "description": "ترتيب عرض عرض الفوترة.",
            "type": "integer"
          },
          "terms": {
            "anyOf": [
              {
                "description": "مدد الشراء المتاحة وأسعارها.",
                "items": {
                  "$ref": "#/components/schemas/PlanTermPrice"
                },
                "type": "array"
              },
              {
                "description": "مدد الشراء المتاحة وأسعارها.",
                "type": "null"
              }
            ],
            "description": "مدد الشراء المتاحة وأسعارها."
          },
          "unit_micros": {
            "description": "سعر كل جهاز نشط زائد بأجزاء المليون.",
            "type": "integer"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "OveragePreference": {
        "additionalProperties": false,
        "properties": {
          "block_api_overage": {
            "description": "ما إذا كانت استدعاءات API وقت التشغيل فوق الحصة المضمنة محظورة.",
            "type": "boolean"
          },
          "block_device_overage": {
            "description": "ما إذا كانت الأجهزة الجديدة القابلة للفوترة فوق الحصة المضمنة محظورة.",
            "type": "boolean"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "مراجعة إعداد تفضيلات الزيادة.",
            "type": "string"
          }
        },
        "required": [
          "mode",
          "block_device_overage",
          "block_api_overage",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "OverageSettings": {
        "additionalProperties": false,
        "properties": {
          "customer_api_settings_enabled": {
            "description": "ما إذا كان بإمكان العملاء إعداد حظر زيادة API.",
            "type": "boolean"
          },
          "customer_device_settings_enabled": {
            "description": "ما إذا كان بإمكان العملاء إعداد حظر زيادة الأجهزة.",
            "type": "boolean"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OveragePlan",
                "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور."
              },
              {
                "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
                "type": "null"
              }
            ],
            "description": "قواعد الحصة المشتراة/الافتراضية الحالية المستخدمة لتحديد الزيادات، أو null عند عدم توفرها."
          },
          "preference": {
            "$ref": "#/components/schemas/OveragePreference",
            "description": "تفضيلات زيادة العميل المحفوظة."
          }
        },
        "required": [
          "preference",
          "plan",
          "customer_device_settings_enabled",
          "customer_api_settings_enabled"
        ],
        "type": "object"
      },
      "OverageSettingsInput": {
        "additionalProperties": false,
        "properties": {
          "block_api_overage": {
            "type": "boolean"
          },
          "block_device_overage": {
            "type": "boolean"
          },
          "expected_version": {
            "description": "استخدم preference.version من GET. فارغ للحفظ الأول. تعيد التغييرات من علامة تبويب أخرى 409؛ ويلزم خيار زيادة واحد على الأقل.",
            "type": "string"
          }
        },
        "required": [
          "expected_version"
        ],
        "type": "object"
      },
      "PaddleCheck": {
        "additionalProperties": false,
        "properties": {
          "connected": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [
          "connected",
          "mode"
        ],
        "type": "object"
      },
      "PaddleOrder": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          },
          "applied_at": {
            "anyOf": [
              {
                "description": "وقت UTC الذي حُفظت فيه نية الدفع المحلية.",
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "وقت UTC الذي فعّلت فيه الدفعة المتحقق منها الخدمة أو أضافت رصيد شحن المحفظة. تحدد قيمتا purchase_id وupgrade_id بقيمة Null عملية شحن."
          },
          "created_at": {
            "description": "وقت UTC الذي حُفظت فيه نية الدفع المحلية.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "id": {
            "description": "معرّف دفع الخدمة المحلي.",
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "paid_at": {
            "anyOf": [
              {
                "description": "وقت UTC الذي حُفظت فيه نية الدفع المحلية.",
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "وقت UTC الذي تحققت فيه الخلفية من معاملة Paddle مكتملة."
          },
          "purchase_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "شراء خدمة أو تجديد معلق موجود؛ يستبعد upgrade_id بصورة متبادلة."
          },
          "refunded_cents": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          },
          "request_id": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "status": {
            "description": "دورة حياة الدفع، بما فيها paid_unapplied عندما تحتاج الأموال المحصلة إلى مراجعة المشغّل واستردادها.",
            "enum": [
              "creating",
              "created",
              "completed",
              "paid_unapplied",
              "partially_refunded",
              "refunded"
            ],
            "type": "string"
          },
          "transaction_id": {
            "anyOf": [
              {
                "description": "اسم عرض خدمة الدفع.",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "معرّف معاملة Paddle Billing المرتبطة، أو null أثناء انتظار نتيجة الإنشاء الأصلية."
          },
          "upgrade_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "عرض ترقية معلق موجود؛ يستبعد purchase_id بصورة متبادلة."
          }
        },
        "required": [
          "id",
          "request_id",
          "mode",
          "transaction_id",
          "purchase_id",
          "upgrade_id",
          "currency",
          "amount_cents",
          "refunded_cents",
          "status",
          "paid_at",
          "applied_at",
          "created_at"
        ],
        "type": "object"
      },
      "PaddleOrderInput": {
        "additionalProperties": false,
        "description": "ادفع شراءً/ترقية مجمدة واحدة، أو أنشئ شحن محفظة بمبلغ وعملة ودون معرّفات خدمة. يعيد request_id الثابت الدفعة الأصلية؛ ويُرفض تغيير نيتها أو مبلغها أو عملتها. لا تضيف رصيدًا للمحفظة أو تفعّل الخدمة إلا المدفوعات المكتملة المتحقق منها بصورة مستقلة. تذهب عوائد الشحن إلى المحفظة. تُستعاد نتيجة الإنشاء غير المؤكدة من webhook الأصلي ولا تُنشأ مجددًا بصورة عمياء مطلقًا.",
        "oneOf": [
          {
            "not": {
              "anyOf": [
                {
                  "required": [
                    "amount"
                  ]
                },
                {
                  "required": [
                    "currency"
                  ]
                }
              ]
            },
            "properties": {
              "purchase_id": {
                "format": "uuid",
                "type": "string"
              },
              "upgrade_id": {
                "type": "null"
              }
            },
            "required": [
              "purchase_id"
            ]
          },
          {
            "not": {
              "anyOf": [
                {
                  "required": [
                    "amount"
                  ]
                },
                {
                  "required": [
                    "currency"
                  ]
                }
              ]
            },
            "properties": {
              "purchase_id": {
                "type": "null"
              },
              "upgrade_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "upgrade_id"
            ]
          },
          {
            "properties": {
              "purchase_id": {
                "type": "null"
              },
              "upgrade_id": {
                "type": "null"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          }
        ],
        "properties": {
          "amount": {
            "description": "مطلوب لشحن المحفظة فقط. مبلغ عرض عشري ضمن الحدود المهيأة. ترفض طلبات الخدمة المبالغ المقدمة من العميل.",
            "pattern": "^\\d+(?:\\.\\d{1,2})?$",
            "type": "string"
          },
          "currency": {
            "description": "مطلوب لشحن المحفظة فقط ويجب تفعيله لهذا الموفّر.",
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "purchase_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "شراء خدمة أو تجديد معلق موجود؛ يستبعد upgrade_id بصورة متبادلة."
          },
          "request_id": {
            "description": "مفتاح طلب ثابت ينشئه المستدعي. تعيد الإعادات عملية الدفع الأصلية.",
            "maxLength": 80,
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          },
          "upgrade_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "عرض ترقية معلق موجود؛ يستبعد purchase_id بصورة متبادلة."
          }
        },
        "required": [
          "request_id"
        ],
        "type": "object"
      },
      "PaddleOrderList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المرئية لهذا المسؤول أو مساحة العمل.",
            "items": {
              "$ref": "#/components/schemas/PaddleOrder"
            },
            "type": "array"
          },
          "total": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "PaddleOrderResult": {
        "additionalProperties": false,
        "properties": {
          "approval_url": {
            "description": "صفحة دفع محلية تفتح معاملة Paddle المرتبطة.",
            "format": "uri",
            "type": "string"
          },
          "client_token": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "order": {
            "$ref": "#/components/schemas/PaddleOrder",
            "description": "سجل دفع خدمة Paddle ضمن نطاق مساحة العمل."
          },
          "return_url": {
            "description": "عنوان URL للوحة المحفظة للشحن، وعنوان URL لتسوية السعر لدفع الخدمة. لا يثبت عنوان العودة وحده الدفع مطلقًا.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "order",
          "client_token",
          "approval_url",
          "return_url"
        ],
        "type": "object"
      },
      "PaddleReconcileInput": {
        "additionalProperties": false,
        "properties": {
          "transaction_id": {
            "description": "معرّف txn_ الأصلي الاختياري لاستعادة استجابة إنشاء مفقودة. تتحقق الخلفية بصورة مستقلة من الطلب المحلي والمستأجر والمنتج والعملة والمبلغ. لا يمكنه استبدال معاملة مرتبطة بالفعل.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PaddleSettings": {
        "additionalProperties": false,
        "properties": {
          "api_key_configured": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "checkout_url": {
            "description": "استخدم صفحة النطاق المعتمد هذه كرابط دفع Paddle الافتراضي.",
            "format": "uri",
            "type": "string"
          },
          "client_token": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "currencies": {
            "description": "العملات المتميزة التي تقبلها هذه القناة؛ تستخدم المبالغ منزلتين عشريتين.",
            "items": {
              "description": "اسم عرض خدمة الدفع.",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "maximum_cents": {
            "description": "الحد الأعلى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100000 ويجب ألا يقل عن minimum_cents.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "minimum_cents": {
            "description": "الحد الأدنى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "product_id": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "version": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "webhook_secret_configured": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "webhook_url": {
            "description": "سجّل عنوان URL المطلق هذا كوجهة إشعارات Paddle.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "mode",
          "client_token",
          "product_id",
          "currencies",
          "api_key_configured",
          "webhook_secret_configured",
          "version",
          "webhook_url",
          "checkout_url"
        ],
        "type": "object"
      },
      "PaddleSettingsInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "مشفر عند التخزين. تحافظ القيمة الفارغة على القيمة الحالية ما لم تكن clear_api_key بقيمة true.",
            "maxLength": 1000,
            "type": "string",
            "writeOnly": true
          },
          "clear_api_key": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "clear_webhook_secret": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "client_token": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "currencies": {
            "description": "العملات المتميزة التي تقبلها هذه القناة؛ تستخدم المبالغ منزلتين عشريتين.",
            "items": {
              "description": "اسم عرض خدمة الدفع.",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "expected_version": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "maximum_cents": {
            "description": "الحد الأعلى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100000 ويجب ألا يقل عن minimum_cents.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "minimum_cents": {
            "description": "الحد الأدنى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "product_id": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "webhook_secret": {
            "description": "سر الواجهة الخاص المستخدم لمصادقة جسم webhook الخام الدقيق.",
            "maxLength": 1000,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "enabled",
          "mode",
          "client_token",
          "product_id",
          "currencies",
          "expected_version"
        ],
        "type": "object"
      },
      "PaddleWebhookEvent": {
        "description": "حدث Paddle Billing غير المعدّل، مصادق عليه باستخدام Paddle-Signature ومسوى بصورة مستقلة عبر Paddle API.",
        "type": "object"
      },
      "PasswordSet": {
        "additionalProperties": false,
        "properties": {
          "password_set": {
            "type": "boolean"
          }
        },
        "required": [
          "password_set"
        ],
        "type": "object"
      },
      "PayPalCheck": {
        "additionalProperties": false,
        "properties": {
          "connected": {
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PayPalInput": {
        "additionalProperties": false,
        "properties": {
          "clear_secret": {
            "type": "boolean"
          },
          "client_id": {
            "maxLength": 1000,
            "type": "string"
          },
          "client_secret": {
            "description": "تحافظ القيمة الفارغة على Secret المحفوظ ما لم تكن clear_secret=true",
            "maxLength": 1000,
            "type": "string",
            "writeOnly": true
          },
          "currencies": {
            "items": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "type": "boolean"
          },
          "expected_version": {
            "type": "string"
          },
          "maximum_cents": {
            "maximum": 100000000,
            "type": "integer"
          },
          "merchant_id": {
            "maxLength": 64,
            "type": "string"
          },
          "minimum_cents": {
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "webhook_id": {
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "mode",
          "client_id",
          "merchant_id",
          "webhook_id",
          "currencies",
          "minimum_cents",
          "maximum_cents",
          "expected_version"
        ],
        "type": "object"
      },
      "PayPalOrder": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "المبلغ بأجزاء المئة؛ قد تكون قيود الدفتر أرصدة موجبة أو خصومات سالبة.",
            "type": "integer"
          },
          "approval_url": {
            "description": "عنوان URL لموافقة دافع PayPal؛ ليس إثبات دفع.",
            "format": "uri",
            "type": "string"
          },
          "capture_id": {
            "description": "معرّف تحصيل PayPal.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "credited_at": {
            "anyOf": [
              {
                "description": "وقت إيداع الشحن، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "وقت إيداع الشحن، أو null.",
                "type": "null"
              }
            ],
            "description": "وقت إيداع الشحن، أو null."
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "paypal_order_id": {
            "description": "معرّف طلب PayPal، ويختلف عن UUID السجل المحلي.",
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_id": {
            "description": "UUID شراء الحزمة المرتبط.",
            "type": [
              "string",
              "null"
            ]
          },
          "refunded_cents": {
            "description": "المبلغ المسترد التراكمي بأجزاء المئة.",
            "type": "integer"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "creating",
              "created",
              "credited",
              "refunded"
            ],
            "type": "string"
          },
          "upgrade_id": {
            "anyOf": [
              {
                "description": "UUID الترقية المرتبطة، أو فارغ.",
                "format": "uuid",
                "type": "string"
              },
              {
                "description": "UUID الترقية المرتبطة، أو فارغ.",
                "type": "null"
              }
            ],
            "description": "UUID الترقية المرتبطة، أو فارغ."
          }
        },
        "required": [],
        "type": "object"
      },
      "PayPalOrderList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/PayPalOrder"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "PayPalRefund": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "الاسترداد النقدي المطلوب عبر المسار الأصلي بالسنتات.",
            "type": "integer"
          },
          "attempts": {
            "type": "integer"
          },
          "case_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "order_id": {
            "format": "uuid",
            "type": "string"
          },
          "paypal_refund_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "reserved": {
            "description": "تكون True أثناء حجز مبلغ المحفظة. تحافظ مهلة النقل على الحجز حتى تسوية الطلب نفسه.",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "pending",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "order_id",
          "request_id",
          "mode",
          "currency",
          "amount_cents",
          "reason",
          "status",
          "reserved",
          "attempts",
          "paypal_refund_id",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "PayPalSettings": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "maxLength": 1000,
            "type": "string"
          },
          "currencies": {
            "items": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "type": "boolean"
          },
          "maximum_cents": {
            "maximum": 100000000,
            "type": "integer"
          },
          "merchant_id": {
            "maxLength": 64,
            "type": "string"
          },
          "minimum_cents": {
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "secret_configured": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          },
          "webhook_id": {
            "maxLength": 1000,
            "type": "string"
          },
          "webhook_url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PaymentChannel": {
        "additionalProperties": false,
        "properties": {
          "currencies": {
            "description": "العملات المتميزة التي تقبلها هذه القناة؛ تستخدم المبالغ منزلتين عشريتين.",
            "items": {
              "description": "اسم عرض خدمة الدفع.",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "provider": {
            "description": "موفّر الدفع: PayPal أو Paddle أو Waffo Pancake.",
            "enum": [
              "paypal",
              "paddle",
              "waffo"
            ],
            "type": "string"
          },
          "version": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "wallet_topup": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          }
        },
        "required": [
          "provider",
          "name",
          "enabled",
          "mode",
          "currencies",
          "wallet_topup"
        ],
        "type": "object"
      },
      "PaymentChannelInput": {
        "additionalProperties": false,
        "properties": {
          "paddle_enabled": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "paddle_version": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "paypal_enabled": {
            "description": "ما إذا كانت هذه القناة تقبل عمليات دفع جديدة. تظل التسوية التاريخية متاحة ببيانات الاعتماد المحتفظ بها.",
            "type": "boolean"
          },
          "paypal_version": {
            "description": "اسم عرض خدمة الدفع.",
            "type": "string"
          },
          "waffo_enabled": {
            "description": "مفتاح Waffo اختياري؛ تحافظ الحقول المحذوفة على حالته الحالية.",
            "type": "boolean"
          },
          "waffo_version": {
            "description": "إصدار الإعداد المطلوب عند تغيير مفتاح Waffo.",
            "type": "string"
          }
        },
        "required": [
          "paypal_enabled",
          "paddle_enabled",
          "paypal_version",
          "paddle_version"
        ],
        "type": "object"
      },
      "PaymentChannels": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المرئية لهذا المسؤول أو مساحة العمل.",
            "items": {
              "$ref": "#/components/schemas/PaymentChannel"
            },
            "type": "array"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [
          "items",
          "mode"
        ],
        "type": "object"
      },
      "PendingPlan": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "type": "string"
          },
          "effective_month": {
            "description": "شهر UTC بتنسيق YYYY-MM الذي يبدأ فيه سريان الجدول.",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "Period": {
        "additionalProperties": false,
        "properties": {
          "base_covered": {
            "description": "ما إذا كانت الحزمة المشتراة تغطي الرسم الأساسي بالفعل.",
            "type": "boolean"
          },
          "base_micros": {
            "description": "الرسم الأساسي بأجزاء المليون من وحدة العملة.",
            "type": "integer"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "hard_limit": {
            "description": "ما إذا تُرفض الأجهزة الجديدة القابلة للفوترة عند حد الحصة.",
            "type": "boolean"
          },
          "included_devices": {
            "description": "حصة الأجهزة النشطة المضمنة.",
            "type": "integer"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "payment_mode": {
            "description": "بيئة الدفع، sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "plan_name": {
            "description": "اسم عرض الخطة.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "unit_micros": {
            "description": "سعر كل جهاز نشط زائد بأجزاء المليون.",
            "type": "integer"
          }
        },
        "required": [
          "month",
          "plan",
          "currency",
          "price_version"
        ],
        "type": "object"
      },
      "PlanChange": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          }
        },
        "required": [
          "plan",
          "currency"
        ],
        "type": "object"
      },
      "PlanGift": {
        "additionalProperties": false,
        "properties": {
          "batch_id": {
            "format": "uuid",
            "type": "string"
          },
          "cancel_reason": {
            "type": "string"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelled_by": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "ends_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "granted",
              "cancelled"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          },
          "value_cents": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "batch_id",
          "tenant_id",
          "user_id",
          "purchase_id",
          "value_cents",
          "status",
          "starts_at",
          "ends_at",
          "created_at",
          "cancelled_at"
        ],
        "type": "object"
      },
      "PlanGiftBatch": {
        "additionalProperties": false,
        "properties": {
          "actor_id": {
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "start_mode": {
            "type": "string"
          },
          "tenant_count": {
            "type": "integer"
          },
          "term_months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "user_count": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "actor_id",
          "request_id",
          "plan",
          "plan_name",
          "currency",
          "price_version",
          "term_months",
          "mode",
          "start_mode",
          "reason",
          "user_count",
          "tenant_count",
          "created_at"
        ],
        "type": "object"
      },
      "PlanGiftCancellation": {
        "additionalProperties": false,
        "properties": {
          "cancelled": {
            "type": "boolean"
          }
        },
        "required": [
          "cancelled"
        ],
        "type": "object"
      },
      "PlanGiftInput": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "fingerprint": {
            "maxLength": 64,
            "minLength": 64,
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "start_mode": {
            "default": "after_current",
            "enum": [
              "after_current",
              "immediate"
            ],
            "type": "string"
          },
          "term_months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "user_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "user_ids",
          "term_months",
          "mode",
          "start_mode",
          "reason",
          "request_id",
          "fingerprint"
        ],
        "type": "object"
      },
      "PlanGiftList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PlanGiftRow"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "PlanGiftPreview": {
        "additionalProperties": false,
        "properties": {
          "fingerprint": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/PlanGiftTarget"
            },
            "type": "array"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "start_mode": {
            "default": "after_current",
            "enum": [
              "after_current",
              "immediate"
            ],
            "type": "string"
          },
          "tenant_count": {
            "type": "integer"
          },
          "term_months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "user_count": {
            "type": "integer"
          },
          "value_cents": {
            "type": "integer"
          }
        },
        "required": [
          "fingerprint",
          "plan_name",
          "value_cents",
          "user_count",
          "tenant_count",
          "mode",
          "term_months",
          "start_mode",
          "items"
        ],
        "type": "object"
      },
      "PlanGiftPreviewInput": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "fingerprint": {
            "maxLength": 64,
            "minLength": 64,
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "start_mode": {
            "default": "after_current",
            "enum": [
              "after_current",
              "immediate"
            ],
            "type": "string"
          },
          "term_months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "user_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "user_ids",
          "mode",
          "reason"
        ],
        "type": "object"
      },
      "PlanGiftResult": {
        "additionalProperties": false,
        "properties": {
          "batch": {
            "$ref": "#/components/schemas/PlanGiftBatch"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/PlanGift"
            },
            "type": "array"
          }
        },
        "required": [
          "batch",
          "items"
        ],
        "type": "object"
      },
      "PlanGiftRow": {
        "additionalProperties": false,
        "properties": {
          "actor_email": {
            "type": "string"
          },
          "batch_id": {
            "format": "uuid",
            "type": "string"
          },
          "cancel_reason": {
            "type": "string"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelled_by": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "ends_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "granted",
              "cancelled"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "term_months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          },
          "value_cents": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "batch_id",
          "tenant_id",
          "user_id",
          "purchase_id",
          "value_cents",
          "status",
          "starts_at",
          "ends_at",
          "created_at",
          "cancelled_at"
        ],
        "type": "object"
      },
      "PlanGiftTarget": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "ends_at": {
            "format": "date-time",
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "previous_end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "price_version": {
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          },
          "value_cents": {
            "type": "integer"
          }
        },
        "required": [
          "user_id",
          "email",
          "tenant_id",
          "tenant_name",
          "starts_at",
          "ends_at",
          "previous_end",
          "plan",
          "plan_name",
          "currency",
          "price_version",
          "value_cents"
        ],
        "type": "object"
      },
      "PlanInput": {
        "additionalProperties": false,
        "properties": {
          "api_hard_limit": {
            "type": "boolean"
          },
          "api_unit_amount": {
            "description": "عدد عشري غير سالب لكل استدعاء API ناجح، ست منازل كحد أقصى",
            "type": "string"
          },
          "base_amount": {
            "description": "عدد عشري غير سالب؛ منزلتان كحد أقصى",
            "type": "string"
          },
          "currency": {
            "description": "يجب إعدادها؛ عروض كتالوج EUR معطلة",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "description": {
            "maxLength": 1000,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "expected_version": {
            "description": "الإصدار الحالي؛ فارغ عند الإنشاء",
            "type": "string"
          },
          "hard_limit": {
            "type": "boolean"
          },
          "included_api_calls": {
            "description": "null = غير محدود؛ 0 = لا استدعاءات ناجحة مضمنة",
            "maximum": 1000000000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "included_devices": {
            "maximum": 1000000000,
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "plan": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "public": {
            "type": "boolean"
          },
          "renewal_only": {
            "description": "يمكن للعملاء المدفوعين أو المهدى إليهم الحاليين التجديد مقدمًا أو بعد الانتهاء في البيئة والعملة نفسيهما. مخفي عن المشتريات العامة الجديدة.",
            "type": "boolean"
          },
          "sort_order": {
            "maximum": 10000,
            "minimum": 0,
            "type": "integer"
          },
          "terms": {
            "description": "إدخال واحد بالضبط لكل من 1 و3 و6 و12 شهرًا، ولكل منها توفره وسعره الإجمالي.",
            "items": {
              "$ref": "#/components/schemas/PlanTermInput"
            },
            "maxItems": 4,
            "minItems": 4,
            "type": "array"
          },
          "unit_amount": {
            "description": "عدد عشري غير سالب؛ ست منازل كحد أقصى",
            "type": "string"
          }
        },
        "required": [
          "plan",
          "currency",
          "name",
          "base_amount",
          "unit_amount"
        ],
        "type": "object"
      },
      "PlanList": {
        "additionalProperties": false,
        "properties": {
          "billing_unit": {
            "type": "string"
          },
          "currencies": {
            "items": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            "type": "array"
          },
          "default_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Price"
            },
            "type": "array"
          },
          "maximum_cents": {
            "type": "integer"
          },
          "minimum_cents": {
            "type": "integer"
          },
          "payment_channels": {
            "description": "إعداد قناة الدفع المتاحة. اعرض القنوات المفعلة المطابقة لبيئة الفوترة النشطة وعملة الشراء فقط.",
            "items": {
              "$ref": "#/components/schemas/PaymentChannel"
            },
            "type": "array"
          },
          "paypal_enabled": {
            "type": "boolean"
          },
          "sandbox": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PlanPurchase": {
        "additionalProperties": false,
        "properties": {
          "api_calls": {
            "description": "بالنسبة إلى PurchaseList.active: الاستدعاءات الناجحة في شهر الحصة الحالي. تحتوي العناصر التاريخية على إجماليات مدى العمر.",
            "type": "integer"
          },
          "api_hard_limit": {
            "description": "ما إذا تتوقف استدعاءات التشغيل عند حد حصة API.",
            "type": "boolean"
          },
          "api_overage_cents": {
            "description": "شهر الحصة الحالي في العرض النشط؛ ورسوم زيادة API طوال العمر في العناصر التاريخية.",
            "type": "integer"
          },
          "api_unit_micros": {
            "description": "سعر كل استدعاء تشغيل زائد بأجزاء المليون.",
            "minimum": 0,
            "type": "integer"
          },
          "base_cents": {
            "description": "الخصم الأولي الفعلي للعقد كله؛ صفر للهدية. يحتوي عرض الترقية الفعالة النشطة على سعر الهدف الكامل للمدة المطابقة.",
            "type": "integer"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لإلغاء العقد، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لإلغاء العقد، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لإلغاء العقد، أو null."
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "current_cycle_index": {
            "description": "فهرس دورة الحصة الحالية.",
            "maximum": 11,
            "minimum": 0,
            "type": "integer"
          },
          "current_upgrade_id": {
            "description": "فارغ قبل الترقية. وإلا يشير إلى أحدث PlanUpgrade مطبق. تتضمن الاستجابة النشطة لقطة خطته الفعالة، بينما تحتفظ المشتريات التاريخية بسعر بيعها الأصلي.",
            "type": "string"
          },
          "cycle_ends_at": {
            "description": "نهاية دورة الحصة الحالية، UTC.",
            "format": "date-time",
            "type": "string"
          },
          "cycle_starts_at": {
            "description": "بداية دورة الحصة الحالية، UTC.",
            "format": "date-time",
            "type": "string"
          },
          "effective_included_devices": {
            "description": "حصة الأجهزة بعد الترقية المطبقة. تبقى لقطات الشراء الأصلية دون تغيير.",
            "minimum": 0,
            "type": "integer"
          },
          "effective_plan": {
            "description": "الاستحقاق الحالي بعد طبقة ترقية صريحة. تحتفظ قائمة الشراء بالقيم الأصلية plan/base_cents للسجل النقدي؛ استخدم هذا الحقل لعرض المستوى الفعال حاليًا.",
            "type": "string"
          },
          "effective_plan_name": {
            "description": "الاستحقاق الحالي بعد طبقة ترقية صريحة. تحتفظ قائمة الشراء بالقيم الأصلية plan/base_cents للسجل النقدي؛ استخدم هذا الحقل لعرض المستوى الفعال حاليًا.",
            "type": "string"
          },
          "ends_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لانتهاء الحزمة أو الدورة، UTC؛ وقد يكون null قبل التفعيل.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لانتهاء الحزمة أو الدورة، UTC؛ وقد يكون null قبل التفعيل.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لانتهاء الحزمة أو الدورة، UTC؛ وقد يكون null قبل التفعيل."
          },
          "entitlement_cents": {
            "description": "قيمة منفعة الحزمة الفعالة الحالية لرصيد الترقية بسنتات العملة. تمتلك خطة 99 USD المهداة قيمة منفعة 9900 سنت رغم أن دفعتها الأصلية base_cents صفر. هذه القيمة ليست نقدًا قابلًا للاسترداد. تُملأ في عروض الحزم النشطة.",
            "minimum": 0,
            "type": "integer"
          },
          "gift_batch_id": {
            "description": "معرّف دفعة الهدية؛ فارغ للمشتريات العادية.",
            "type": "string"
          },
          "gift_follows_current": {
            "default": false,
            "description": "يشير إلى هدية صدرت من مستوى العميل الحالي. تحتفظ الهدية بقيمة استحقاقها الأصلية ودفع نقدي صفر. تطبق ترقيات التغطية الكاملة الصريحة طبقات استحقاق منفصلة على كل هدية غير منتهية وتحتفظ بسجل الهدية الأصلي ذي الدفع النقدي الصفري.",
            "type": "boolean"
          },
          "hard_limit": {
            "description": "ما إذا تُرفض الأجهزة الجديدة القابلة للفوترة عند حد الحصة.",
            "type": "boolean"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "included_api_calls": {
            "description": "null = غير محدود؛ 0 = لا استدعاءات ناجحة مضمنة",
            "maximum": 1000000000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "included_devices": {
            "description": "حصة الأجهزة النشطة المضمنة.",
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "overage_cents": {
            "description": "شهر الحصة الحالي في العرض النشط؛ ورسوم زيادة الأجهزة طوال العمر في العناصر التاريخية.",
            "type": "integer"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "plan_name": {
            "description": "اسم عرض الخطة.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "refunded_cents": {
            "description": "المبلغ المسترد التراكمي بأجزاء المئة.",
            "type": "integer"
          },
          "renewal": {
            "description": "ما إذا كان هذا عقد تجديد.",
            "type": "boolean"
          },
          "renewal_of": {
            "description": "معرّف الحزمة المدفوعة أو المهداة السابقة. يحافظ على سلسلة التجديد وسجل الشراء الأصلي.",
            "type": "string"
          },
          "request_id": {
            "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
            "type": "string"
          },
          "service_credit_basis_cents": {
            "description": "أساس المبلغ بأجزاء المئة لحسابات رصيد الخدمة.",
            "type": "integer"
          },
          "service_credit_basis_seconds": {
            "description": "أساس الوقت بالثواني لحسابات رصيد الخدمة.",
            "type": "integer"
          },
          "source": {
            "description": "مصدر الاستحقاق، مثل purchase أو gift.",
            "enum": [
              "purchase",
              "gift",
              "auto_renewal"
            ],
            "type": "string"
          },
          "starts_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لبدء الحزمة أو الدورة، UTC.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لبدء الحزمة أو الدورة، UTC.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لبدء الحزمة أو الدورة، UTC."
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "pending",
              "active",
              "cancelled",
              "expired"
            ],
            "type": "string"
          },
          "term_months": {
            "default": 1,
            "description": "عدد الأشهر في المدة المشتراة.",
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          },
          "total_api_calls": {
            "description": "استدعاءات التشغيل التراكمية عبر العقد.",
            "type": "integer"
          },
          "total_api_overage_cents": {
            "description": "زيادات API للعقد التراكمية بأجزاء المئة.",
            "type": "integer"
          },
          "total_device_overage_cents": {
            "description": "زيادات أجهزة العقد التراكمية بأجزاء المئة.",
            "type": "integer"
          },
          "unit_micros": {
            "description": "سعر كل جهاز نشط زائد بأجزاء المليون.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "PlanTermInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "description": "إجمالي مدة غير سالب؛ منزلتان عشريتان كحد أقصى. يجب أن يساوي مبلغ الشهر الواحد base_amount.",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "months": {
            "default": 1,
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          }
        },
        "required": [
          "months",
          "enabled",
          "amount"
        ],
        "type": "object"
      },
      "PlanTermPrice": {
        "additionalProperties": false,
        "properties": {
          "base_cents": {
            "description": "إجمالي الرسم للمدة المحددة بسنتات العملة. لا تُضرب الحصص الشهرية بهذه المدة.",
            "minimum": 0,
            "type": "integer"
          },
          "enabled": {
            "description": "ما إذا كانت واجهة webhook مفعلة.",
            "type": "boolean"
          },
          "months": {
            "default": 1,
            "description": "عدد الأشهر في مدة الشراء.",
            "enum": [
              1,
              3,
              6,
              12
            ],
            "type": "integer"
          }
        },
        "required": [
          "months",
          "enabled",
          "base_cents"
        ],
        "type": "object"
      },
      "PlanUpgrade": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "الدفعة المجمعة لكل عنصر في parts. تُخصم مرة واحدة ذريًا. تصف حقول الحساب النسبي الأخرى في الأصل الفترة الحالية فقط؛ افحص parts للقيمة الأصلية والمستهدفة والثواني المتبقية والفارق الفردي لكل فترة.",
            "type": "integer"
          },
          "api_hard_limit": {
            "description": "ما إذا تتوقف استدعاءات التشغيل عند حد حصة API.",
            "type": "boolean"
          },
          "api_unit_micros": {
            "description": "معدل زيادة API الجديد بأجزاء المليون من العملة.",
            "type": "integer"
          },
          "applied_at": {
            "anyOf": [
              {
                "description": "وقت سريان الترقية، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "وقت سريان الترقية، أو null.",
                "type": "null"
              }
            ],
            "description": "وقت سريان الترقية، أو null."
          },
          "base_cents": {
            "description": "السعر الشهري المستهدف بالسنتات، وليس المبلغ المستحق الآن.",
            "type": "integer"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "العملة نفسها للحزمة الحالية.",
            "type": "string"
          },
          "cycle_seconds": {
            "description": "طول دورة الشراء الأصلية بالثواني.",
            "type": "integer"
          },
          "ends_at": {
            "description": "الطابع الزمني لانتهاء الحزمة أو الدورة، UTC؛ وقد يكون null قبل التفعيل.",
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "بعد 15 دقيقة من الإنشاء أو انتهاء الخطة الأصلية، أيهما أسبق.",
            "format": "date-time",
            "type": "string"
          },
          "hard_limit": {
            "description": "ما إذا تُرفض الأجهزة الجديدة القابلة للفوترة عند حد الحصة.",
            "type": "boolean"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "included_api_calls": {
            "anyOf": [
              {
                "description": "إجمالي حصة API للدورة الحالية. تعني Null غير محدود. تظل الاستدعاءات السابقة محسوبة.",
                "type": "integer"
              },
              {
                "description": "استدعاءات التشغيل الناجحة المضمنة؛ تعني null غير محدود و0 عدم تضمين أي استدعاءات.",
                "type": "null"
              }
            ],
            "description": "استدعاءات التشغيل الناجحة المضمنة؛ تعني null غير محدود و0 عدم تضمين أي استدعاءات."
          },
          "included_devices": {
            "description": "إجمالي الحصة للدورة الحالية؛ يظل استخدام الأجهزة السابق محسوبًا.",
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "parent_id": {
            "description": "تشير طبقات الاستحقاق الداخلية المطبقة إلى خصم أصل واحد. تُستثنى هذه السجلات الفرعية من سجل ترقيات العميل وأعداد المبيعات.",
            "format": "uuid",
            "type": "string"
          },
          "parts": {
            "description": "كل الفترات الحالية والمستقبلية المدفوعة/المهداة غير المنتهية، بترتيب التاريخ. ترقية التغطية الكاملة إلزامية؛ لا توجد مجموعة فرعية من الفترات قابلة للاختيار.",
            "items": {
              "$ref": "#/components/schemas/UpgradePart"
            },
            "type": "array"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "plan_name": {
            "description": "اسم عرض الخطة.",
            "type": "string"
          },
          "previous_base_cents": {
            "description": "السعر الشهري الفعال الحالي بالسنتات.",
            "type": "integer"
          },
          "previous_plan_name": {
            "description": "اسم عرض الخطة قبل الترقية.",
            "type": "string"
          },
          "previous_upgrade_id": {
            "description": "معرّف الترقية السابقة، أو فارغ للترقية الأولى. يستخدم لرفض العروض القديمة.",
            "type": "string"
          },
          "price_version": {
            "description": "إصدار سعر الهدف المجمد.",
            "type": "string"
          },
          "purchase_id": {
            "description": "UUID شراء الحزمة المرتبط.",
            "format": "uuid",
            "type": "string"
          },
          "remaining_seconds": {
            "description": "الثواني المتبقية عند إنشاء العرض، مقربة للأعلى.",
            "type": "integer"
          },
          "request_id": {
            "description": "مفتاح ثابت ينشئه العميل. تعيد إعادة استخدامه بمعلمات عرض مختلفة 409.",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "pending",
              "applied",
              "expired"
            ],
            "type": "string"
          },
          "unit_micros": {
            "description": "معدل زيادة الجهاز الجديد بأجزاء المليون من العملة.",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "request_id",
          "mode",
          "purchase_id",
          "previous_upgrade_id",
          "plan",
          "plan_name",
          "previous_plan_name",
          "currency",
          "price_version",
          "previous_base_cents",
          "base_cents",
          "amount_cents",
          "included_devices",
          "unit_micros",
          "hard_limit",
          "included_api_calls",
          "api_unit_micros",
          "api_hard_limit",
          "remaining_seconds",
          "cycle_seconds",
          "ends_at",
          "expires_at",
          "status",
          "created_at",
          "applied_at"
        ],
        "type": "object"
      },
      "PlatformOperation": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "actor_email": {
            "type": "string"
          },
          "actor_id": {
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "details": {
            "description": "سلسلة JSON تحتوي على التغييرات الإدارية الصريحة فقط؛ ولا تحتوي مطلقًا على كلمات مرور أو رموز أو بيانات دفع.",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "user_email": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "actor_id",
          "action",
          "user_id",
          "tenant_id",
          "resource_id",
          "reason",
          "details",
          "request_id",
          "created_at",
          "actor_email",
          "user_email"
        ],
        "type": "object"
      },
      "PlatformOperationList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PlatformOperation"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "PlatformOverview": {
        "additionalProperties": false,
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "counts": {
            "additionalProperties": false,
            "properties": {
              "active_packages": {
                "type": "integer"
              },
              "active_workspaces": {
                "type": "integer"
              },
              "disabled_users": {
                "type": "integer"
              },
              "enabled_plans": {
                "type": "integer"
              },
              "expiring_packages": {
                "type": "integer"
              },
              "failed_mail": {
                "type": "integer"
              },
              "gift_packages": {
                "type": "integer"
              },
              "new_users": {
                "type": "integer"
              },
              "suspended_workspaces": {
                "type": "integer"
              },
              "users": {
                "type": "integer"
              },
              "verified_users": {
                "type": "integer"
              }
            },
            "required": [
              "users",
              "verified_users",
              "disabled_users",
              "new_users",
              "active_workspaces",
              "suspended_workspaces",
              "active_packages",
              "expiring_packages",
              "gift_packages",
              "failed_mail",
              "enabled_plans"
            ],
            "type": "object"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "paypal_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "counts",
          "mode",
          "paypal_enabled",
          "at"
        ],
        "type": "object"
      },
      "PlatformReason": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "PlatformRevocation": {
        "additionalProperties": false,
        "properties": {
          "revoked": {
            "type": "boolean"
          }
        },
        "required": [
          "revoked"
        ],
        "type": "object"
      },
      "PlatformUser": {
        "additionalProperties": false,
        "properties": {
          "admin_note": {
            "description": "ملاحظة منصة خاصة. تبقى حقول ملف العميل دون تغيير.",
            "maxLength": 2000,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "email_verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_platform_admin": {
            "type": "boolean"
          },
          "last_login_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "note_version": {
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "read_only"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "tenant_status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          },
          "tenant_updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tenant_name",
          "tenant_status",
          "tenant_updated_at",
          "email",
          "name",
          "role",
          "status",
          "is_platform_admin",
          "email_verified_at",
          "created_at",
          "updated_at",
          "last_login_at",
          "admin_note",
          "note_version"
        ],
        "type": "object"
      },
      "PlatformUserDetail": {
        "additionalProperties": false,
        "properties": {
          "counts": {
            "additionalProperties": false,
            "properties": {
              "licenses": {
                "type": "integer"
              },
              "products": {
                "type": "integer"
              },
              "users": {
                "type": "integer"
              }
            },
            "required": [
              "users",
              "products",
              "licenses"
            ],
            "type": "object"
          },
          "payments": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "currency": {
                  "type": "string"
                },
                "mode": {
                  "enum": [
                    "sandbox",
                    "live"
                  ],
                  "type": "string"
                },
                "paid_cents": {
                  "type": "integer"
                },
                "refunded_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "mode",
                "currency",
                "paid_cents",
                "refunded_cents"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "purchases": {
            "items": {
              "$ref": "#/components/schemas/PlanPurchase"
            },
            "type": "array"
          },
          "user": {
            "$ref": "#/components/schemas/PlatformUser"
          },
          "wallets": {
            "items": {
              "$ref": "#/components/schemas/Wallet"
            },
            "type": "array"
          }
        },
        "required": [
          "user",
          "counts",
          "wallets",
          "purchases",
          "payments"
        ],
        "type": "object"
      },
      "PlatformUserList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PlatformUser"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "PlatformUserUpdate": {
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "status",
              "expected_updated_at"
            ]
          },
          {
            "required": [
              "admin_note",
              "expected_note_version"
            ]
          }
        ],
        "properties": {
          "admin_note": {
            "maxLength": 2000,
            "type": "string"
          },
          "expected_note_version": {
            "type": "string"
          },
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "PlatformWorkspaceStatus": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "PlatformWorkspaceUpdate": {
        "additionalProperties": false,
        "properties": {
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "reason",
          "expected_updated_at"
        ],
        "type": "object"
      },
      "Policy": {
        "additionalProperties": false,
        "example": {
          "created_at": "2026-10-18T00:00:00Z",
          "features": [
            "export"
          ],
          "heartbeat_seconds": 600,
          "id": "22222222-2222-4222-8222-222222222222",
          "max_devices": 1,
          "mode": "timed",
          "name": "One device",
          "offline_mode": "limited",
          "offline_seconds": 86400,
          "product_id": "11111111-1111-4111-8111-111111111111",
          "updated_at": "2026-10-18T00:00:00Z",
          "version": 1
        },
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "features": {
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "فاصل ضربات القلب عند الاتصال، بالثواني. يعطل 0 ضربات القلب الدورية. تُهيأ حصة عدم الاتصال بصورة منفصلة.",
            "type": "integer"
          },
          "id": {
            "description": "UUID السياسة، ويستخدم كـ policy_id عند إصدار ترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "max_devices": {
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "offline_mode": {
            "description": "limited: عدم اتصال محدود المدة؛ none: لا استخدام دون اتصال؛ permanent: لا حد إضافي لمدة عدم الاتصال، لكن انتهاء الترخيص يظل ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "الثواني المسموح بها دون اتصال: 1–31536000 للحالة limited، و0 للحالتين none/permanent. هذه ليست فترة نبضات الاتصال. عند تفعيل النبضات، يجب أن تحقق سياسات العمل المحدود دون اتصال الجديدة offline_seconds \u003e= 3 × heartbeat_seconds؛ كما يجب أن تغطي مدة حجز المقعد العائم ثلاث فترات نبض على الأقل.",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "تزداد مراجعة السياسة مع كل تعديل. عند تطبيقها على تراخيص موجودة، تتحقق من أن المعاينة ما زالت حديثة.",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "product_id",
          "mode",
          "version"
        ],
        "type": "object"
      },
      "PolicyCapabilities": {
        "additionalProperties": false,
        "properties": {
          "allow_vm": {
            "description": "ما إذا كانت الآلات الافتراضية مسموحة.",
            "type": "boolean"
          },
          "device_match": {
            "description": "مطابقة هوية system أو مطابقة هوية hardware.",
            "enum": [
              "system",
              "hardware"
            ],
            "type": "string"
          },
          "license_model": {
            "description": "ربط جهاز node_locked أو مقاعد floating.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "maintenance_days": {
            "description": "أيام الصيانة منذ أول تفعيل؛ يعني 0 عدم وجود حد لانتهاء الصيانة.",
            "maximum": 36500,
            "minimum": 0,
            "type": "integer"
          },
          "max_version": {
            "description": "الحد الأعلى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أعلى.",
            "type": "string"
          },
          "meter_rules": {
            "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "allow_overage": {
                  "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                  "type": "boolean"
                },
                "feature": {
                  "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                  "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                "limit": {
                  "description": "مرات استخدام الميزة المضمنة لكل فترة قياس (ليست حد التقسيم إلى صفحات).",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "max_overage": {
                  "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "period": {
                  "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                  "enum": [
                    "month",
                    "day",
                    "lifetime"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "feature",
                "limit",
                "period"
              ],
              "type": "object"
            },
            "maxItems": 32,
            "type": "array"
          },
          "min_version": {
            "description": "الحد الأدنى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أدنى.",
            "type": "string"
          },
          "policy_id": {
            "description": "UUID السياسة؛ يجب أن تنتمي إلى المنتج عند الإصدار.",
            "format": "uuid",
            "type": "string"
          },
          "policy_version": {
            "description": "مراجعة السياسة؛ أرسل القيمة الحالية عند تعديل القدرات الكاملة لمنع الكتابة القديمة.",
            "type": "integer"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "require_hardware": {
            "description": "ما إذا كانت هوية hardware قابلة للاستخدام مطلوبة.",
            "type": "boolean"
          },
          "self_release_limit": {
            "description": "عمليات التحرير الذاتي المسموحة لكل 30 يومًا متحركًا، 0–100؛ يعطلها 0.",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "session_seconds": {
            "description": "ثواني إيجار المقعد العائم دون ضربات قلب، 20–86400؛ يجب أن تستوفي قيود تشغيل السياسة.",
            "maximum": 86400,
            "minimum": 20,
            "type": "integer"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PolicyCapabilitiesInput": {
        "additionalProperties": false,
        "description": "يحدد وضع الإصدار وحدود الأجهزة/المقاعد والميزات وقواعد التشغيل. لا تُخزن مدة صلاحية في السياسة. يلزم policy_version لمنع التعديلات القديمة.",
        "properties": {
          "allow_vm": {
            "description": "ما إذا كانت الآلات الافتراضية مسموحة.",
            "type": "boolean"
          },
          "device_match": {
            "description": "مطابقة هوية system أو مطابقة هوية hardware.",
            "enum": [
              "system",
              "hardware"
            ],
            "type": "string"
          },
          "features": {
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "يعطل 0 ضربات القلب الدورية صراحة؛ وإلا 600–86400 ثانية (بحد أدنى 10 دقائق). مستقل عن حصة عدم الاتصال.",
            "type": "integer"
          },
          "license_model": {
            "description": "ربط جهاز node_locked أو مقاعد floating.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "maintenance_days": {
            "description": "أيام الصيانة منذ أول تفعيل؛ يعني 0 عدم وجود حد لانتهاء الصيانة.",
            "maximum": 36500,
            "minimum": 0,
            "type": "integer"
          },
          "max_devices": {
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "max_version": {
            "description": "الحد الأعلى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أعلى.",
            "type": "string"
          },
          "meter_rules": {
            "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "allow_overage": {
                  "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                  "type": "boolean"
                },
                "feature": {
                  "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                  "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                "limit": {
                  "description": "مرات استخدام الميزة المضمنة لكل فترة قياس (ليست حد التقسيم إلى صفحات).",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "max_overage": {
                  "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "period": {
                  "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                  "enum": [
                    "month",
                    "day",
                    "lifetime"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "feature",
                "limit",
                "period"
              ],
              "type": "object"
            },
            "maxItems": 32,
            "type": "array"
          },
          "min_version": {
            "description": "الحد الأدنى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أدنى.",
            "type": "string"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "offline_mode": {
            "description": "حصة عدم اتصال limited أو none أو permanent؛ يظل انتهاء الترخيص ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "Limited: من 1–31536000 ثانية وبحد أدنى 3 × heartbeat_seconds عند تفعيل النبضات؛ none/permanent: 0",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          },
          "policy_version": {
            "description": "مراجعة السياسة؛ أرسل القيمة الحالية عند تعديل القدرات الكاملة لمنع الكتابة القديمة.",
            "minimum": 1,
            "type": "integer"
          },
          "require_hardware": {
            "description": "ما إذا كانت هوية hardware قابلة للاستخدام مطلوبة.",
            "type": "boolean"
          },
          "self_release_limit": {
            "description": "عمليات التحرير الذاتي المسموحة لكل 30 يومًا متحركًا، 0–100؛ يعطلها 0.",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "session_seconds": {
            "description": "ثواني إيجار المقعد العائم دون ضربات قلب، 20–86400؛ يجب أن تستوفي قيود تشغيل السياسة.",
            "maximum": 86400,
            "minimum": 20,
            "type": "integer"
          }
        },
        "required": [
          "policy_version"
        ],
        "type": "object"
      },
      "PolicyCreate": {
        "additionalProperties": false,
        "description": "يحدد وضع الإصدار وحدود الأجهزة/المقاعد والميزات وقواعد التشغيل. لا تُخزن مدة الصلاحية في السياسة. ",
        "properties": {
          "allow_vm": {
            "description": "ما إذا كانت الآلات الافتراضية مسموحة.",
            "type": "boolean"
          },
          "device_match": {
            "description": "مطابقة هوية system أو مطابقة هوية hardware.",
            "enum": [
              "system",
              "hardware"
            ],
            "type": "string"
          },
          "features": {
            "description": "معرّفات الميزات المسموح بها، مثل [\"export\"]. يجب أن تطابق وسائط CheckFeature في تطبيقك.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "فاصل ضربات القلب عند الاتصال، بالثواني. يعطل 0 ضربات القلب الدورية. تُهيأ حصة عدم الاتصال بصورة منفصلة.",
            "type": "integer"
          },
          "license_model": {
            "description": "ربط جهاز node_locked أو مقاعد floating.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "maintenance_days": {
            "description": "أيام الصيانة منذ أول تفعيل؛ يعني 0 عدم وجود حد لانتهاء الصيانة.",
            "maximum": 36500,
            "minimum": 0,
            "type": "integer"
          },
          "max_devices": {
            "description": "حد الأجهزة لكل ترخيص، 1–10000؛ وفي وضع floating هو حد المقاعد المتزامنة.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "max_version": {
            "description": "الحد الأعلى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أعلى.",
            "type": "string"
          },
          "meter_rules": {
            "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "allow_overage": {
                  "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                  "type": "boolean"
                },
                "feature": {
                  "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                  "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                  "type": "string"
                },
                "limit": {
                  "description": "مرات استخدام الميزة المضمنة لكل فترة قياس (ليست حد التقسيم إلى صفحات).",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "max_overage": {
                  "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "period": {
                  "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                  "enum": [
                    "month",
                    "day",
                    "lifetime"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "feature",
                "limit",
                "period"
              ],
              "type": "object"
            },
            "maxItems": 32,
            "type": "array"
          },
          "min_version": {
            "description": "الحد الأدنى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أدنى.",
            "type": "string"
          },
          "mode": {
            "description": "نوع الترخيص: perpetual أو timed أو trial. ليس هذا نوع اشتراك خطة فوترة.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم السياسة، مثل Pro لمدة 30 يومًا.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "offline_mode": {
            "description": "limited: عدم اتصال محدود المدة؛ none: لا استخدام دون اتصال؛ permanent: لا حد إضافي لمدة عدم الاتصال، لكن انتهاء الترخيص يظل ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "الثواني المسموح بها دون اتصال: 1–31536000 للحالة limited، و0 للحالتين none/permanent. هذه ليست فترة نبضات الاتصال. عند تفعيل النبضات، يجب أن تحقق سياسات العمل المحدود دون اتصال الجديدة offline_seconds \u003e= 3 × heartbeat_seconds؛ كما يجب أن تغطي مدة حجز المقعد العائم ثلاث فترات نبض على الأقل.",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          },
          "product_id": {
            "description": "معرّف المنتج (UUID).",
            "format": "uuid",
            "type": "string"
          },
          "require_hardware": {
            "description": "ما إذا كانت هوية hardware قابلة للاستخدام مطلوبة.",
            "type": "boolean"
          },
          "self_release_limit": {
            "description": "عمليات التحرير الذاتي المسموحة لكل 30 يومًا متحركًا، 0–100؛ يعطلها 0.",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "session_seconds": {
            "description": "ثواني إيجار المقعد العائم دون ضربات قلب، 20–86400؛ يجب أن تستوفي قيود تشغيل السياسة.",
            "maximum": 86400,
            "minimum": 20,
            "type": "integer"
          }
        },
        "required": [
          "product_id",
          "name",
          "mode",
          "max_devices"
        ],
        "type": "object"
      },
      "PolicyList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Policy"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "PolicyPreview": {
        "additionalProperties": false,
        "properties": {
          "changes": {
            "description": "مقارنة قبل/بعد لكل ترخيص وسبب الحظر.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "active": {
                  "description": "علامة مفتاح التوقيع الحالي؛ وفي معاينة السياسة عدد الأجهزة/الجلسات النشطة.",
                  "type": "integer"
                },
                "after": {
                  "additionalProperties": false,
                  "description": "الاستحقاقات بعد تطبيق السياسة المستهدفة؛ يبقى العمر دون تغيير.",
                  "properties": {
                    "duration_days": {
                      "description": "أيام كل ترخيص منذ أول تفعيل. يلزم 1–36500 لإصدار timed/trial؛ وغائبة/null لـ perpetual. لا تُخزن في السياسة مطلقًا.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "anyOf": [
                        {
                          "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                          "type": "null"
                        }
                      ],
                      "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد."
                    },
                    "features": {
                      "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "license_model": {
                      "description": "ربط جهاز node_locked أو مقاعد floating.",
                      "enum": [
                        "node_locked",
                        "floating"
                      ],
                      "type": "string"
                    },
                    "maintenance_until": {
                      "anyOf": [
                        {
                          "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "description": "موعد انتهاء الصيانة للإصدارات الجديدة؛ قد يكون null قبل التفعيل أو عند عدم وجود حد.",
                          "type": "null"
                        }
                      ],
                      "description": "موعد انتهاء الصيانة للإصدارات الجديدة؛ قد يكون null قبل التفعيل أو عند عدم وجود حد."
                    },
                    "max_devices": {
                      "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
                      "type": "integer"
                    },
                    "max_version": {
                      "description": "الحد الأعلى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أعلى.",
                      "type": "string"
                    },
                    "meter_rules": {
                      "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "allow_overage": {
                            "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                            "type": "boolean"
                          },
                          "feature": {
                            "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                            "type": "string"
                          },
                          "limit": {
                            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
                            "maximum": 1000000000000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "max_overage": {
                            "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                            "maximum": 1000000000000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "period": {
                            "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                            "enum": [
                              "month",
                              "day",
                              "lifetime"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "feature",
                          "limit",
                          "period"
                        ],
                        "type": "object"
                      },
                      "maxItems": 32,
                      "type": "array"
                    },
                    "min_version": {
                      "description": "الحد الأدنى لإصدار التطبيق المسموح؛ وتعني القيمة الفارغة عدم وجود حد أدنى.",
                      "type": "string"
                    },
                    "mode": {
                      "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
                      "enum": [
                        "perpetual",
                        "timed",
                        "trial"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "max_devices",
                    "features",
                    "expires_at",
                    "duration_days",
                    "license_model",
                    "meter_rules",
                    "maintenance_until",
                    "min_version",
                    "max_version"
                  ],
                  "type": "object"
                },
                "before": {
                  "additionalProperties": false,
                  "description": "الاستحقاقات الصادرة الحالية وعمر الترخيص.",
                  "properties": {
                    "capabilities": {
                      "$ref": "#/components/schemas/LicenseCapabilities",
                      "description": "لقطة قدرات الترخيص."
                    },
                    "duration_days": {
                      "description": "أيام كل ترخيص منذ أول تفعيل. يلزم 1–36500 لإصدار timed/trial؛ وغائبة/null لـ perpetual. لا تُخزن في السياسة مطلقًا.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "anyOf": [
                        {
                          "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                          "type": "null"
                        }
                      ],
                      "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد."
                    },
                    "features": {
                      "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "max_devices": {
                      "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
                      "type": "integer"
                    },
                    "meter_rules": {
                      "description": "قواعد قياس الميزات؛ وتعني القيمة الفارغة عدم إعداد أي قواعد.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "allow_overage": {
                            "description": "ما إذا كان تجاوز استخدام الميزة مسموحًا.",
                            "type": "boolean"
                          },
                          "feature": {
                            "description": "معرّف الميزة المقاسة، ويجب أن يوجد في ميزات السياسة.",
                            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
                            "type": "string"
                          },
                          "limit": {
                            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
                            "maximum": 1000000000000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "max_overage": {
                            "description": "أقصى استخدام زائد مسموح؛ معطل عندما تكون allow_overage بقيمة false.",
                            "maximum": 1000000000000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "period": {
                            "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                            "enum": [
                              "month",
                              "day",
                              "lifetime"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "feature",
                          "limit",
                          "period"
                        ],
                        "type": "object"
                      },
                      "maxItems": 32,
                      "type": "array"
                    },
                    "mode": {
                      "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
                      "enum": [
                        "perpetual",
                        "timed",
                        "trial"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "max_devices",
                    "features",
                    "expires_at",
                    "duration_days",
                    "capabilities",
                    "meter_rules"
                  ],
                  "type": "object"
                },
                "blocked_reason": {
                  "description": "سبب حظر التغيير؛ تعني القيمة الفارغة عدم وجود مانع حالي.",
                  "type": "string"
                },
                "customer": {
                  "description": "تسمية عميل يحددها المورّد، مختلفة عن بريد بوابة العميل.",
                  "type": "string"
                },
                "id": {
                  "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "customer",
                "before",
                "after",
                "blocked_reason",
                "active"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "expires_in": {
            "const": 600,
            "description": "عمر رمز المعاينة بالثواني، حاليًا 600.",
            "type": "integer"
          },
          "note": {
            "description": "إرشادات إضافية للمطور.",
            "type": "string"
          },
          "policy_version": {
            "description": "مراجعة السياسة؛ أرسل القيمة الحالية عند تعديل القدرات الكاملة لمنع الكتابة القديمة.",
            "type": "integer"
          },
          "preview_token": {
            "description": "رمز تأكيد معاينة مشفر مطلوب لـ apply_policy؛ صالح 600 ثانية وتبطله تغييرات الموارد.",
            "type": "string"
          }
        },
        "required": [
          "changes",
          "policy_version",
          "preview_token",
          "expires_in",
          "note"
        ],
        "type": "object"
      },
      "PolicySyncResult": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "synced_licenses": {
            "description": "عدد التراخيص المرتبطة غير الملغاة التي زومنت في المعاملة نفسها.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "synced_licenses"
        ],
        "type": "object"
      },
      "PolicyUpdate": {
        "additionalProperties": false,
        "description": "يحدد وضع الإصدار وحدود الأجهزة/المقاعد والميزات وقواعد التشغيل. لا تُخزن مدة الصلاحية في السياسة. ",
        "properties": {
          "features": {
            "description": "حتى 32 معرّف ميزة متميزًا، كل منها من 1–64 حرف ASCII أو رقم أو نقطة أو شرطة أو شرطة سفلية.",
            "items": {
              "pattern": "^[A-Za-z0-9_.-]{1,64}$",
              "type": "string"
            },
            "maxItems": 32,
            "type": "array",
            "uniqueItems": true
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "يعطل 0 ضربات القلب الدورية صراحة؛ وإلا 600–86400 ثانية (بحد أدنى 10 دقائق). مستقل عن حصة عدم الاتصال.",
            "type": "integer"
          },
          "max_devices": {
            "description": "الحد الأقصى للأجهزة المتزامنة أو المقاعد العائمة لكل ترخيص.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "perpetual",
              "timed",
              "trial"
            ],
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "offline_mode": {
            "description": "حصة عدم اتصال limited أو none أو permanent؛ يظل انتهاء الترخيص ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "Limited: من 1–31536000 ثانية وبحد أدنى 3 × heartbeat_seconds عند تفعيل النبضات؛ none/permanent: 0",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "PreviewInput": {
        "additionalProperties": false,
        "properties": {
          "ids": {
            "description": "UUID تراخيص متميزة للمعالجة، 1–100.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "policy_id": {
            "description": "UUID السياسة؛ يجب أن تنتمي إلى المنتج عند الإصدار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "policy_id",
          "ids"
        ],
        "type": "object"
      },
      "Price": {
        "additionalProperties": false,
        "properties": {
          "api_hard_limit": {
            "description": "ما إذا تتوقف استدعاءات التشغيل عند حد حصة API.",
            "type": "boolean"
          },
          "api_unit_micros": {
            "description": "سعر كل استدعاء تشغيل زائد بأجزاء المليون.",
            "minimum": 0,
            "type": "integer"
          },
          "base_micros": {
            "description": "الرسم الأساسي بأجزاء المليون من وحدة العملة.",
            "type": "integer"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "type": "string"
          },
          "description": {
            "description": "وصف عرض الفوترة.",
            "type": "string"
          },
          "enabled": {
            "description": "ما إذا كان عرض الفوترة مفعّلًا للشراء.",
            "type": "boolean"
          },
          "hard_limit": {
            "description": "ما إذا تُرفض الأجهزة الجديدة القابلة للفوترة عند حد الحصة.",
            "type": "boolean"
          },
          "included_api_calls": {
            "description": "null = غير محدود؛ 0 = لا استدعاءات ناجحة مضمنة",
            "maximum": 1000000000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "included_devices": {
            "description": "حصة الأجهزة النشطة المضمنة.",
            "type": "integer"
          },
          "name": {
            "description": "اسم عرض عرض الفوترة.",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          },
          "public": {
            "description": "ما إذا كان عرض الفوترة مدرجًا للعامة.",
            "type": "boolean"
          },
          "renewal_only": {
            "description": "يمكن للعملاء المدفوعين أو المهدى إليهم الحاليين التجديد مقدمًا أو بعد الانتهاء في البيئة والعملة نفسيهما. مخفي عن المشتريات العامة الجديدة.",
            "type": "boolean"
          },
          "sort_order": {
            "description": "ترتيب عرض عرض الفوترة.",
            "type": "integer"
          },
          "terms": {
            "description": "مدد الشراء المتاحة وأسعارها.",
            "items": {
              "$ref": "#/components/schemas/PlanTermPrice"
            },
            "type": "array"
          },
          "unit_micros": {
            "description": "سعر كل جهاز نشط زائد بأجزاء المليون.",
            "type": "integer"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث بتوقيت UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "Product": {
        "additionalProperties": false,
        "example": {
          "created_at": "2026-10-18T00:00:00Z",
          "description": "Desktop reporting software",
          "id": "11111111-1111-4111-8111-111111111111",
          "name": "Report app",
          "status": "active",
          "updated_at": "2026-10-18T00:00:00Z"
        },
        "properties": {
          "created_at": {
            "description": "الطابع الزمني للإنشاء، UTC ISO 8601.",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "وصف المنتج.",
            "type": "string"
          },
          "id": {
            "description": "UUID المنتج المستخدم في إعداد SDK وإنشاء السياسة.",
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "description": "اسم المنتج.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "description": "تسمح active بالتفعيل؛ وترفض disabled طلبات الترخيص وقت التشغيل.",
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          },
          "updated_at": {
            "description": "الطابع الزمني لآخر تحديث، UTC ISO 8601.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "type": "object"
      },
      "ProductCreate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "description": "وصف اختياري للبرنامج، حتى 1000 محرف.",
            "maxLength": 1000,
            "type": "string"
          },
          "name": {
            "description": "اسم البرنامج، 1–120 محرفًا.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "ProductList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "ProductUpdate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "description": "وصف المنتج؛ يجوز أن يكون فارغًا.",
            "maxLength": 1000,
            "type": "string"
          },
          "name": {
            "description": "اسم مقروء للبشر؛ راجع قيود الطول.",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "enum": [
              "active",
              "disabled"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "ProviderRefund": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "attempted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "case_id": {
            "format": "uuid",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "order_id": {
            "format": "uuid",
            "type": "string"
          },
          "provider": {
            "enum": [
              "waffo",
              "paddle"
            ],
            "type": "string"
          },
          "provider_refund_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": "string"
          },
          "reserved": {
            "type": "boolean"
          },
          "settled_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "enum": [
              "created",
              "submitting",
              "pending",
              "unknown",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "submitted_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "unapplied": {
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseList": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanPurchase",
                "description": "علامة مفتاح التوقيع الحالي؛ وفي معاينة السياسة عدد الأجهزة/الجلسات النشطة."
              },
              {
                "description": "علامة مفتاح التوقيع الحالي؛ وفي معاينة السياسة عدد الأجهزة/الجلسات النشطة.",
                "type": "null"
              }
            ],
            "description": "عقد الحزمة المشتراة الفعال حاليًا، أو null."
          },
          "active_devices": {
            "description": "إشغال المنتج/الجهاز المسجل الحالي، مستقلًا عن سجل الاستخدام الشهري للأجهزة. تظل التسجيلات العادية محسوبة دون اتصال حتى تحريرها. لا تُحسب الجلسات العائمة إلا خلال صلاحية إيجارها، وتُزال التكرارات حسب الأجهزة مع الرجوع إلى هوية الجهاز عند الحاجة. يعيد التحرير أو انتهاء آخر جلسة عائمة السعة؛ وتستمر التسجيلات الصالحة عبر حدود أشهر الحصة. تُستثنى تسجيلات تجربة SDK المعزولة.",
            "type": "integer"
          },
          "coverage_ends_at": {
            "anyOf": [
              {
                "description": "نهاية تغطية الحزمة المدفوعة المستمرة، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "نهاية تغطية الحزمة المدفوعة المستمرة، أو null.",
                "type": "null"
              }
            ],
            "description": "نهاية إجمالي التغطية المدفوعة مسبقًا، بما فيها التجديدات المقدمة المدفوعة والهدايا المجدولة. تظل الحزمة النشطة تبلغ عن فترة حصتها الحالية الخاصة."
          },
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/PlanPurchase"
            },
            "type": "array"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "renewal_package": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanPurchase",
                "description": "أحدث عقد مدفوع مؤهل للتجديد، أو null."
              },
              {
                "description": "أحدث عقد مدفوع مؤهل للتجديد، أو null.",
                "type": "null"
              }
            ],
            "description": "أحدث تغطية مدفوعة أو مهداة، بما فيها ترقيتها المطبقة. استخدم هذه الخطة الفعالة والعملة لاختيار التجديد اليدوي أو التلقائي. تكون Null حتى فتح حزمة."
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "RechargeInput": {
        "additionalProperties": false,
        "description": "اربط purchase_id OR upgrade_id، وليس كليهما مطلقًا. تضيف الدفعة المؤكدة رصيدًا للمحفظة وتسوي ذلك الشراء/الترقية عندما يظل العرض صالحًا. تبقى مدفوعات الترقية المتأخرة في المحفظة.",
        "properties": {
          "amount": {
            "description": "قيمة شحن عشرية، منزلتان كحد أقصى",
            "type": "string"
          },
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "request_id": {
            "maxLength": 80,
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          },
          "upgrade_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "currency",
          "amount",
          "request_id"
        ],
        "type": "object"
      },
      "RecoverOriginalRefund": {
        "additionalProperties": false,
        "properties": {
          "confirm_unpaid_manual": {
            "const": true,
            "type": "boolean"
          },
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "confirm_unpaid_manual"
        ],
        "type": "object"
      },
      "RefundHistory": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RefundHistoryItem"
            },
            "type": "array"
          },
          "limit": {
            "minimum": 0,
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "offset": {
            "minimum": 0,
            "type": "integer"
          },
          "total": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RefundHistoryItem": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "case_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "provider": {
            "enum": [
              "paypal",
              "waffo",
              "paddle"
            ],
            "type": "string"
          },
          "provider_refund_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "settled_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RefundInboxItem": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "minimum": 0,
            "type": "integer"
          },
          "cancellation_scope": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_email": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "manual_refund_pending": {
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "pending_review": {
            "type": "boolean"
          },
          "purchase_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "refund_totals": {
            "description": "مبالغ لكل عملة مشفرة بصيغة JSON للإلغاءات محددة النطاق.",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "enum": [
              "wallet",
              "service"
            ],
            "type": "string"
          },
          "source": {
            "enum": [
              "wallet_request",
              "support_case"
            ],
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RefundInboxList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RefundInboxItem"
            },
            "type": "array"
          },
          "limit": {
            "minimum": 0,
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "offset": {
            "minimum": 0,
            "type": "integer"
          },
          "summary": {
            "additionalProperties": false,
            "properties": {
              "pending_review": {
                "minimum": 0,
                "type": "integer"
              },
              "service_pending_review": {
                "minimum": 0,
                "type": "integer"
              },
              "wallet_pending_review": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "total": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RefundInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "description": "مبلغ استرداد موجب بعملة التحصيل؛ لا يمكن أن يتجاوز أموال التحصيل المتبقية أو رصيد المحفظة المتاح غير المنفق.",
            "pattern": "^[0-9]+(?:\\.[0-9]{1,2})?$",
            "type": "string"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "reason",
          "request_id"
        ],
        "type": "object"
      },
      "RefundList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PayPalRefund"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "RefundQuote": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "type": "integer"
          },
          "automatic_entitlement_cancellation": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "quoted_at": {
            "format": "date-time",
            "type": "string"
          },
          "requires_confirmation": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "RefundReview": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "string"
          },
          "amounts": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount": {
                  "type": "string"
                },
                "purchase_id": {
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [
                "purchase_id",
                "amount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "approve": {
            "type": "boolean"
          },
          "decision": {
            "maxLength": 3000,
            "type": "string"
          },
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "quote_hash": {
            "type": "string"
          },
          "quoted_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "approve",
          "decision"
        ],
        "type": "object"
      },
      "Register": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "password": {
            "description": "12–128 بايت UTF-8، وليس محارف",
            "type": "string",
            "writeOnly": true
          },
          "password_confirmation": {
            "description": "مطلوب ويجب أن يطابق كلمة المرور تمامًا",
            "type": "string",
            "writeOnly": true
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "tenant_name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "password",
          "password_confirmation",
          "name",
          "tenant_name"
        ],
        "type": "object"
      },
      "Release": {
        "additionalProperties": false,
        "example": {
          "channel": "stable",
          "created_at": "2026-10-18T00:00:00Z",
          "download_url": "",
          "id": "33333333-3333-4333-8333-333333333333",
          "notes": "Initial release",
          "product_id": "11111111-1111-4111-8111-111111111111",
          "published_at": "2026-10-18T00:00:00Z",
          "sha256": "",
          "version": "1.0.0"
        },
        "properties": {
          "channel": {
            "description": "قناة الإصدار، stable أو preview؛ الافتراضي stable.",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "download_url": {
            "description": "عنوان تنزيل HTTPS؛ يلزم sha256 عند تقديم URL.",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "notes": {
            "description": "ملاحظات الإصدار.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "published_at": {
            "description": "الطابع الزمني لنشر الإصدار، UTC؛ الافتراضي وقت الخادم.",
            "format": "date-time",
            "type": "string"
          },
          "sha256": {
            "description": "SHA-256 لملف التنزيل، 64 محرفًا سداسيًا عشريًا صغيرًا، وهو مختلف عن خوارزمية التوقيع.",
            "type": "string"
          },
          "version": {
            "description": "مراجعة السياسة أو إصدار المنتج major.minor.patch أو إصدار بروتوكول عدم الاتصال 1، حسب الكائن.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "product_id",
          "version",
          "channel",
          "notes",
          "download_url",
          "sha256",
          "published_at",
          "created_at"
        ],
        "type": "object"
      },
      "ReleaseInput": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "description": "قناة الإصدار، stable أو preview؛ الافتراضي stable.",
            "enum": [
              "stable",
              "preview"
            ],
            "type": "string"
          },
          "download_url": {
            "description": "عنوان تنزيل HTTPS؛ يلزم sha256 عند تقديم URL.",
            "format": "uri",
            "maxLength": 2000,
            "type": "string"
          },
          "notes": {
            "description": "ملاحظات الإصدار.",
            "maxLength": 10000,
            "type": "string"
          },
          "published_at": {
            "description": "الطابع الزمني لنشر الإصدار، UTC؛ الافتراضي وقت الخادم.",
            "format": "date-time",
            "type": "string"
          },
          "sha256": {
            "description": "SHA-256 لملف التنزيل، 64 محرفًا سداسيًا عشريًا صغيرًا، وهو مختلف عن خوارزمية التوقيع.",
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "version": {
            "description": "مراجعة السياسة أو إصدار المنتج major.minor.patch أو إصدار بروتوكول عدم الاتصال 1، حسب الكائن.",
            "pattern": "^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$",
            "type": "string"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "ReleaseList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Release"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "Renew": {
        "additionalProperties": false,
        "properties": {
          "days": {
            "description": "أيام إضافية، 1–36500؛ يؤثر تجديد الترخيص والصيانة في شروط مختلفة.",
            "maximum": 36500,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "days"
        ],
        "type": "object"
      },
      "RenewalPlans": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Price"
            },
            "type": "array"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [
          "items",
          "mode"
        ],
        "type": "object"
      },
      "Renewed": {
        "additionalProperties": false,
        "example": {
          "duration_days": 60,
          "expires_at": null,
          "id": "33333333-3333-4333-8333-333333333333"
        },
        "properties": {
          "duration_days": {
            "description": "تزيد التجديدات قبل أول تفعيل هذه القيمة. بعد التفعيل تحتفظ بالمدة الأصلية؛ استخدم expires_at للموعد الفعلي.",
            "maximum": 36500,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد.",
                "type": "null"
              }
            ],
            "description": "انتهاء الترخيص؛ null لتراخيص timed/trial غير المفعلة أو perpetual. في كائنات المفاتيح، انتهاء بيانات الاعتماد."
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "expires_at",
          "duration_days"
        ],
        "type": "object"
      },
      "ReservationResult": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID ربط الجهاز أو جلسة التشغيل. احفظه لطلبات الترخيص المستقبلية؛ ليس مفتاح ترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0
              },
              {
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "فاصل ضربات القلب الحالي بالثواني؛ لا يحدّث القياس التوقيع أو المؤقت.",
            "type": "integer"
          },
          "reservation": {
            "$ref": "#/components/schemas/FeatureReservation"
          }
        },
        "required": [
          "activation_id",
          "reservation"
        ],
        "type": "object"
      },
      "Revenue": {
        "additionalProperties": false,
        "properties": {
          "invoices": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "currency": {
                  "pattern": "^[A-Z]{3}$",
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "month": {
                  "type": "string"
                },
                "paid_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "plan": {
                  "type": "string"
                },
                "plan_name": {
                  "type": "string"
                },
                "refunded_at": {
                  "anyOf": [
                    {
                      "format": "date-time",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string"
                },
                "tenant_name": {
                  "type": "string"
                },
                "total_cents": {
                  "type": "integer"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "month": {
            "type": "string"
          },
          "offset": {
            "type": "integer"
          },
          "paddle_totals": {
            "description": "إجمالي المدفوعات والاستردادات التراكمية لمشتريات الخدمة وشحن المحفظة معًا، مجمعة حسب شهر الدفع الأصلي والعملة؛ وليست تسوية مصرفية.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "currency": {
                  "description": "اسم عرض خدمة الدفع.",
                  "type": "string"
                },
                "paid_cents": {
                  "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
                  "type": "integer"
                },
                "refunded_cents": {
                  "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
                  "type": "integer"
                }
              },
              "required": [
                "currency",
                "paid_cents",
                "refunded_cents"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "paid_users": {
            "type": "integer"
          },
          "purchase_total": {
            "type": "integer"
          },
          "purchases": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "api_calls": {
                  "type": "integer"
                },
                "api_overage_cents": {
                  "type": "integer"
                },
                "base_cents": {
                  "type": "integer"
                },
                "currency": {
                  "pattern": "^[A-Z]{3}$",
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "ends_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "overage_cents": {
                  "type": "integer"
                },
                "plan": {
                  "pattern": "^[a-z][a-z0-9_-]{0,63}$",
                  "type": "string"
                },
                "plan_name": {
                  "type": "string"
                },
                "source": {
                  "enum": [
                    "purchase",
                    "gift"
                  ],
                  "type": "string"
                },
                "starts_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "pending",
                    "active",
                    "cancelled"
                  ],
                  "type": "string"
                },
                "tenant_name": {
                  "type": "string"
                },
                "term_months": {
                  "default": 1,
                  "enum": [
                    1,
                    3,
                    6,
                    12
                  ],
                  "type": "integer"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "recharged_users": {
            "type": "integer"
          },
          "registered_users": {
            "type": "integer"
          },
          "sales": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "currency": {
                  "pattern": "^[A-Z]{3}$",
                  "type": "string"
                },
                "plan": {
                  "type": "string"
                },
                "plan_name": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer"
                },
                "total_cents": {
                  "type": "integer"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "sold_subscriptions": {
            "type": "integer"
          },
          "timezone": {
            "type": "string"
          },
          "topup_total": {
            "type": "integer"
          },
          "topups": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount_cents": {
                  "type": "integer"
                },
                "credited_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "currency": {
                  "pattern": "^[A-Z]{3}$",
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "provider": {
                  "description": "الموفّر الأصلي لشحن المحفظة؛ تظل الاستردادات مرتبطة بهذا الموفّر.",
                  "enum": [
                    "paypal",
                    "paddle",
                    "waffo"
                  ],
                  "type": "string"
                },
                "refunded_cents": {
                  "type": "integer"
                },
                "status": {
                  "type": "string"
                },
                "tenant_name": {
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          },
          "totals": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "consumption_cents": {
                  "type": "integer"
                },
                "consumption_refund_cents": {
                  "type": "integer"
                },
                "currency": {
                  "pattern": "^[A-Z]{3}$",
                  "type": "string"
                },
                "paypal_refund_cents": {
                  "type": "integer"
                },
                "recharge_cents": {
                  "type": "integer"
                },
                "wallet_refund_cents": {
                  "description": "استردادات/عكس عمليات المحفظة المنفذة عبر PayPal وPaddle وWaffo؛ باستثناء حجوزات الاسترداد المؤقتة.",
                  "type": "integer"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "upgrade_total": {
            "description": "عدد الترقيات المطبقة في البيئة وفترة الإبلاغ المحددتين، بما فيها الترقيات المجانية. تُحسب منفصلة عن مبيعات الحزم الأولية.",
            "type": "integer"
          },
          "upgrades": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount_cents": {
                  "description": "المبلغ النسبي المدفوع فعليًا؛ وليس السعر الشهري الكامل الجديد.",
                  "type": "integer"
                },
                "applied_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "currency": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "ends_at": {
                  "description": "انتهاء الحزمة الأصلي، لا تغيره الترقية.",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "plan_name": {
                  "description": "اسم الحزمة المستهدفة.",
                  "type": "string"
                },
                "previous_plan_name": {
                  "description": "الحزمة الفعالة قبل هذه الترقية.",
                  "type": "string"
                },
                "tenant_name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "email",
                "tenant_name",
                "plan_name",
                "previous_plan_name",
                "currency",
                "amount_cents",
                "applied_at",
                "ends_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "waffo_totals": {
            "description": "إجمالي المدفوعات والاستردادات التراكمية لمشتريات الخدمة وشحن المحفظة معًا، مجمعة حسب شهر الدفع الأصلي والعملة؛ وليست تسوية مصرفية.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "currency": {
                  "description": "معرّف التاجر الذي يبدأ بـ MER_.",
                  "type": "string"
                },
                "paid_cents": {
                  "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
                  "type": "integer"
                },
                "refunded_cents": {
                  "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
                  "type": "integer"
                }
              },
              "required": [
                "currency",
                "paid_cents",
                "refunded_cents"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [],
        "type": "object"
      },
      "RuntimeAPIPeriod": {
        "additionalProperties": false,
        "properties": {
          "api_calls": {
            "description": "استدعاءات API التشغيل المقاسة الناجحة ضمن النطاق؛ تُستثنى طلبات الإدارة.",
            "type": "integer"
          },
          "api_hard_limit": {
            "description": "ما إذا تتوقف استدعاءات التشغيل عند حد حصة API.",
            "type": "boolean"
          },
          "api_overage_cents": {
            "description": "رسم زيادة API بأجزاء المئة في هذه الدورة.",
            "type": "integer"
          },
          "api_unit_micros": {
            "description": "سعر كل استدعاء تشغيل زائد بأجزاء المليون.",
            "minimum": 0,
            "type": "integer"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "included_api_calls": {
            "description": "null = غير محدود؛ 0 = لا استدعاءات ناجحة مضمنة",
            "maximum": 1000000000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "price_version": {
            "description": "مراجعة سعر مجمدة؛ قد يسبب المدخل القديم PLAN_VERSION_CONFLICT.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "RuntimeInput": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "data.activation_id من آخر تفعيل ناجح. مطلوب للتحقق وضربات القلب وconsume وإلغاء التفعيل؛ لا يُحذف إلا في activate الأول.",
            "format": "uuid",
            "type": "string"
          },
          "app_version": {
            "description": "إصدار التطبيق الحالي، major.minor.patch، مثل 1.0.0. مطلوب لقواعد الصيانة أو نطاق الإصدار. لا تبلغ خطأ عن تطبيق أحدث باعتباره إصدارًا أقدم.",
            "pattern": "^$|^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$",
            "type": "string"
          },
          "device_id": {
            "description": "SHA-256 من 64 محرفًا سداسيًا عشريًا صغيرًا يحسبه SDK من هوية المنتج والنظام والأجهزة. لا تستبدله بقيمة ثابتة.",
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "device_name": {
            "description": "اسم العرض في لوحة التحكم، حتى 120 محرفًا. لا يحدد هوية الجهاز.",
            "maxLength": 120,
            "type": "string"
          },
          "device_profile": {
            "$ref": "#/components/schemas/DeviceProfile",
            "description": "ملف الجهاز الذي ينشئه SDK. قدّمه حسب متطلبات السياسات لهوية الأجهزة أو رفض VM أو ترحيل الأجهزة."
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "feature": {
            "description": "معرّف الميزة المستهلكة.",
            "maxLength": 64,
            "type": "string"
          },
          "identity_token": {
            "description": "JWT لهوية Launch من نوع Ed25519 ومحدد النوع وأحادي الاستخدام؛ لا تُوثق أي مطالبات استحقاق كحقوق شراء.",
            "maxLength": 12288,
            "type": "string",
            "writeOnly": true
          },
          "launch_connection_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "license_key": {
            "description": "مفتاح العميل الكامل: lv_lic_ مفتاح ترخيص عادي؛ وlv_tmp_ لاسترداد النقل الأولي. بعد النجاح يستخدم SDK بيانات اعتماد lv_dev_ مرتبطة بالجهاز. ليس API Key لإدارة المورّد.",
            "pattern": "^(?:lv_(?:lic|tmp|dev)_[A-Za-z0-9_-]{43})?$",
            "type": "string",
            "writeOnly": true
          },
          "product_id": {
            "description": "UUID المنتج؛ يجب أن يطابق منتج الترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "quantity": {
            "description": "الوحدات المطلوبة لهذه العملية، عدد صحيح 1–1000000000.",
            "maximum": 1000000000,
            "minimum": 1,
            "type": "integer"
          },
          "request_logout_ticket": {
            "description": "التفاوض على قدرات SDK. اطلب تذكرة خروج خاصة بفك الربط عندما لا تكون هناك تذكرة محفوظة للربط الحالي. احذفها عند وجود تذكرة خروج صالحة محفوظة؛ وتتجنب ضربات القلب في الحالة المستقرة بحثًا إضافيًا عن التذكرة.",
            "type": "boolean"
          },
          "reservation_id": {
            "description": "معرّف الحجز؛ أرسل هذه القيمة للاعتماد أو الإلغاء.",
            "format": "uuid",
            "type": "string"
          },
          "reservation_seconds": {
            "default": 900,
            "description": "عمر الحجز الاختياري، 30–3600 ثانية؛ الافتراضي 900. ينتهي مبكرًا عند إعادة ضبط الفترة.",
            "maximum": 3600,
            "minimum": 30,
            "type": "integer"
          },
          "session_id": {
            "description": "مطلوب للتراخيص العائمة: أنشئ UUID لكل مثيل يعمل وأعد استخدامه لطلبات ذلك المثيل. اختياري للتراخيص المرتبطة بالجهاز.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "license_key",
          "device_id"
        ],
        "type": "object"
      },
      "RuntimePolicy": {
        "additionalProperties": false,
        "properties": {
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0
              },
              {
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "فاصل ضربات القلب عند الاتصال، بالثواني. يعطل 0 ضربات القلب الدورية. تُهيأ حصة عدم الاتصال بصورة منفصلة.",
            "type": "integer"
          },
          "offline_mode": {
            "description": "limited: عدم اتصال محدود المدة؛ none: لا استخدام دون اتصال؛ permanent: لا حد إضافي لمدة عدم الاتصال، لكن انتهاء الترخيص يظل ساريًا.",
            "enum": [
              "limited",
              "none",
              "permanent"
            ],
            "type": "string"
          },
          "offline_seconds": {
            "description": "الثواني المسموح بها دون اتصال: 1–31536000 للحالة limited، و0 للحالتين none/permanent. هذه ليست فترة نبضات الاتصال. عند تفعيل النبضات، يجب أن تحقق سياسات العمل المحدود دون اتصال الجديدة offline_seconds \u003e= 3 × heartbeat_seconds؛ كما يجب أن تغطي مدة حجز المقعد العائم ثلاث فترات نبض على الأقل.",
            "maximum": 31536000,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "heartbeat_seconds",
          "offline_mode",
          "offline_seconds"
        ],
        "type": "object"
      },
      "RuntimeResult": {
        "additionalProperties": false,
        "properties": {
          "activation_id": {
            "description": "UUID ربط الجهاز أو جلسة التشغيل. احفظه لطلبات الترخيص المستقبلية؛ ليس مفتاح ترخيص.",
            "format": "uuid",
            "type": "string"
          },
          "deactivated": {
            "description": "القيمة true عند نجاح إلغاء التفعيل. تحرر ربطًا أو جلسة؛ ولا تحذف الترخيص أو تعيد ضبط مدته.",
            "type": "boolean"
          },
          "device_key": {
            "description": "بيانات اعتماد جهاز مقيدة ومثبتة بالجهاز وإصدار الربط. تتطلب بيانات وضع الحساب أيضًا جلسة ترخيص واستحقاقًا نشطين؛ ولا يمكنها إعادة تفعيل ربط محرر.",
            "pattern": "^lv_dev_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "heartbeat_seconds": {
            "anyOf": [
              {
                "const": 0,
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال."
              },
              {
                "description": "فاصل ضربات القلب بالثواني: يعطله 0؛ وإلا فهو 600–86400. يستخدم الإغفال القيم الافتراضية للخادم؛ وهو مستقل عن حصة عدم الاتصال.",
                "maximum": 86400,
                "minimum": 600,
                "type": "integer"
              }
            ],
            "description": "ثواني ضربات القلب المقترحة. يمكن حذف حقل المستوى الأعلى للقيمة 0؛ وتكون runtime_policy.heartbeat_seconds في التوقيع قيمة السياسة المرجعية.",
            "type": "integer"
          },
          "lease": {
            "$ref": "#/components/schemas/Lease",
            "description": "ذاكرة ترخيص مؤقتة موقعة من الخادم. لا تقبلها إلا بعد التحقق بمفتاح عام موثوق مثبت وفحص المنتج/الجهاز. لا يعيدها إلغاء التفعيل أو consume."
          },
          "logout_ticket": {
            "$ref": "#/components/schemas/LogoutTicket",
            "description": "قدرة خاصة بفك الربط لنسخة الربط المحددة هذه؛ أبقها خارج سجلات طلبات التشغيل."
          }
        },
        "required": [
          "activation_id"
        ],
        "type": "object"
      },
      "SDKConfig": {
        "additionalProperties": false,
        "example": {
          "allow_http": false,
          "app_version": "",
          "base_url": "https://www.licentivo.com",
          "cache_path": "",
          "device_name": "My application",
          "license_key": "",
          "product_id": "11111111-1111-4111-8111-111111111111",
          "trusted_keys": {
            "66666666-6666-4666-8666-666666666666": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          }
        },
        "properties": {
          "allow_http": {
            "description": "ما إذا كان HTTP مسموحًا، للتطوير المحلي فقط.",
            "type": "boolean"
          },
          "app_version": {
            "description": "إصدار البرنامج الحالي major.minor.patch.",
            "type": "string"
          },
          "base_url": {
            "description": "مصدر خادم الترخيص، عادةً HTTPS، دون /api/v1.",
            "type": "string"
          },
          "cache_path": {
            "description": "مسار الذاكرة المؤقتة المحلية؛ تتيح القيمة الفارغة لـ SDK اختيار دليل مستخدم خاص.",
            "type": "string"
          },
          "device_name": {
            "description": "تسمية جهاز مقروءة للبشر، وليست هوية أمنية.",
            "type": "string"
          },
          "license_key": {
            "description": "مفتاح ترخيص العميل الكامل المقدم عند التفعيل. لا يحتوي رمز تهيئة المنتج وتنزيلات الأمثلة على هذا السر. تستخدم الطلبات دون اتصال بيانات الاعتماد التي يوفرها SDK.",
            "type": "string"
          },
          "product_id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "تعيين UUID المفتاح العام إلى المفتاح العام Base64URL للتحقق المثبت.",
            "type": "object"
          }
        },
        "required": [
          "base_url",
          "product_id",
          "license_key",
          "app_version",
          "device_name",
          "trusted_keys",
          "cache_path",
          "allow_http"
        ],
        "type": "object"
      },
      "SDKExampleInfo": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "can_configure": {
            "type": "boolean"
          },
          "duration_days": {
            "const": 3,
            "type": "integer"
          },
          "starts_at_first_activation": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "SDKExampleSetting": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "duration_days": {
            "const": 3,
            "type": "integer"
          },
          "policy_id": {
            "description": "UUID السياسة المخصصة؛ فارغ قبل الإعداد الأولي.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج المخصص؛ فارغ قبل الإعداد الأولي.",
            "type": "string"
          }
        },
        "required": [
          "available",
          "duration_days",
          "product_id",
          "policy_id"
        ],
        "type": "object"
      },
      "SDKExampleSetup": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "SDKExampleTrial": {
        "additionalProperties": false,
        "properties": {
          "duration_days": {
            "const": 3,
            "type": "integer"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "first_activated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "license_key": {
            "type": "string"
          },
          "starts_at_first_activation": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "SDKInitializer": {
        "additionalProperties": false,
        "example": {
          "language": "go",
          "product_id": "11111111-1111-4111-8111-111111111111",
          "source": "const productID = \"11111111-1111-4111-8111-111111111111\"\nvar trustedKeys = map[string]string{\"66666666-6666-4666-8666-666666666666\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}\n",
          "trusted_keys": {
            "66666666-6666-4666-8666-666666666666": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          }
        },
        "properties": {
          "language": {
            "description": "معرّف لغة SDK لحزمة التنزيل.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          },
          "source": {
            "description": "ثوابت المنتج العامة للصقها في الرمز؛ دون سر تفعيل العميل.",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "تعيين UUID المفتاح العام إلى المفتاح العام Base64URL للتحقق المثبت.",
            "type": "object"
          }
        },
        "required": [
          "product_id",
          "trusted_keys",
          "language",
          "source"
        ],
        "type": "object"
      },
      "ScheduledPlan": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "type": "string"
          },
          "effective_month": {
            "description": "شهر UTC بتنسيق YYYY-MM الذي يبدأ فيه سريان الجدول.",
            "type": "string"
          },
          "plan": {
            "description": "معرّف خطة فوترة ثابت من الكتالوج المنشور.",
            "type": "string"
          },
          "sandbox": {
            "description": "بيئة Sandbox.",
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "ScopedRefundPreview": {
        "additionalProperties": false,
        "properties": {
          "affected_purchases": {
            "items": {
              "$ref": "#/components/schemas/ScopedRefundPurchase"
            },
            "type": "array"
          },
          "auto_renewal_disabled": {
            "type": "boolean"
          },
          "auto_renewal_enabled": {
            "type": "boolean"
          },
          "cancellation_at": {
            "const": "approval",
            "type": "string"
          },
          "pending_purchase_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "pending_upgrade_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "quote_hash": {
            "type": "string"
          },
          "quoted_at": {
            "format": "date-time",
            "type": "string"
          },
          "remaining_purchases": {
            "items": {
              "$ref": "#/components/schemas/ScopedRefundPurchase"
            },
            "type": "array"
          },
          "request": {
            "$ref": "#/components/schemas/CustomerRefundInput"
          },
          "scope": {
            "enum": [
              "purchase",
              "service"
            ],
            "type": "string"
          },
          "totals": {
            "items": {
              "$ref": "#/components/schemas/ScopedRefundTotal"
            },
            "type": "array"
          }
        },
        "required": [],
        "type": "object"
      },
      "ScopedRefundPurchase": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "type": "integer"
          },
          "approved_cents": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "ends_at": {
            "format": "date-time",
            "type": "string"
          },
          "maximum_cents": {
            "type": "integer"
          },
          "plan_name": {
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "requires_review": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "ScopedRefundTotal": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "type": "integer"
          },
          "approved_cents": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "held_cents": {
            "type": "integer"
          },
          "manual_cents": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "ServiceCompensation": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "incident_id": {
            "description": "UUID حادث الخدمة المرتبط.",
            "format": "uuid",
            "type": "string"
          },
          "intervals": {
            "description": "الفترات الزمنية المعوضة معادة كسلسلة JSON.",
            "type": "string"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "type": "string"
          },
          "purchase_id": {
            "description": "UUID شراء الحزمة المرتبط.",
            "format": "uuid",
            "type": "string"
          },
          "seconds": {
            "description": "الثواني المضافة كتعويض عن الخدمة.",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "incident_id",
          "mode",
          "seconds",
          "purchase_id",
          "created_at"
        ],
        "type": "object"
      },
      "ServiceCompensationList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/ServiceCompensation"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ServiceIncident": {
        "additionalProperties": false,
        "properties": {
          "affected_tenants": {
            "description": "مصفوفة معرّفات مساحات العمل مشفرة بصيغة JSON؛ وتعني [] النطاق العام.",
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "emergency": {
            "type": "boolean"
          },
          "ends_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "ServiceIncidentInput": {
        "additionalProperties": false,
        "properties": {
          "affected_tenants": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "body": {
            "type": "string"
          },
          "emergency": {
            "type": "boolean"
          },
          "ends_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "maintenance",
              "incident"
            ],
            "type": "string"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "title",
          "body",
          "starts_at"
        ],
        "type": "object"
      },
      "ServiceIncidentList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ServiceIncident"
            },
            "type": "array"
          },
          "now": {
            "format": "date-time",
            "type": "string"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "SignedCapabilities": {
        "additionalProperties": false,
        "properties": {
          "app_version": {
            "description": "app version لعملية ترخيص Launch هذه.",
            "pattern": "^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$",
            "type": "string"
          },
          "binding_version": {
            "description": "جيل ربط الجهاز الموقع المرتبط بجلسة الترخيص.",
            "minimum": 1,
            "type": "integer"
          },
          "environment": {
            "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
            "enum": [
              "live",
              "sandbox"
            ],
            "type": "string"
          },
          "launch_connection_id": {
            "description": "UUID مورد Licentivo.",
            "format": "uuid",
            "type": "string"
          },
          "license_model": {
            "description": "license model لعملية ترخيص Launch هذه.",
            "enum": [
              "node_locked",
              "floating"
            ],
            "type": "string"
          },
          "maintenance_until": {
            "description": "maintenance until لعملية ترخيص Launch هذه.",
            "type": "integer"
          },
          "session_expires_at": {
            "description": "session expires at لعملية ترخيص Launch هذه.",
            "maximum": 253402300799,
            "type": "integer"
          },
          "session_id": {
            "description": "session id لعملية ترخيص Launch هذه.",
            "format": "uuid",
            "type": "string"
          },
          "version_released_at": {
            "description": "version released at لعملية ترخيص Launch هذه.",
            "type": "integer"
          }
        },
        "required": [
          "license_model"
        ],
        "type": "object"
      },
      "SigningKey": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "description": "علامة مفتاح التوقيع الحالي؛ وفي معاينة السياسة عدد الأجهزة/الجلسات النشطة.",
            "type": "boolean"
          },
          "algorithm": {
            "const": "Ed25519",
            "description": "خوارزمية التوقيع، حاليًا Ed25519.",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "key_id": {
            "description": "UUID مفتاح توقيع المنتج المستخدم لاختيار مفتاح التحقق.",
            "format": "uuid",
            "type": "string"
          },
          "public_key": {
            "description": "مفتاح Ed25519 عام مشفر بـ Base64URL؛ دون مواد خاصة.",
            "type": "string"
          },
          "retired_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني لإحالة المفتاح للتقاعد؛ null للمفاتيح الحالية. تظل المفاتيح العامة المتقاعدة متاحة للتحقق.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني لإحالة المفتاح للتقاعد؛ null للمفاتيح الحالية. تظل المفاتيح العامة المتقاعدة متاحة للتحقق.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني لإحالة المفتاح للتقاعد؛ null للمفاتيح الحالية. تظل المفاتيح العامة المتقاعدة متاحة للتحقق."
          }
        },
        "required": [
          "key_id",
          "public_key",
          "active"
        ],
        "type": "object"
      },
      "StateResult": {
        "additionalProperties": false,
        "example": {
          "id": "33333333-3333-4333-8333-333333333333",
          "status": "pending"
        },
        "properties": {
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "Subscription": {
        "additionalProperties": false,
        "properties": {
          "current": {
            "$ref": "#/components/schemas/Period",
            "description": "لقطة الفوترة الافتراضية لشهر UTC الحالي."
          },
          "next": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PendingPlan",
                "description": "الخطة الافتراضية المجدولة للشهر التالي، أو null."
              },
              {
                "description": "الخطة الافتراضية المجدولة للشهر التالي، أو null.",
                "type": "null"
              }
            ],
            "description": "الخطة الافتراضية المجدولة للشهر التالي، أو null."
          },
          "sandbox": {
            "description": "تعيد معاينة الاشتراك هذه true. حدد بيئة الدفع الفعلية من إعدادات الفوترة/الدفع، وليس من علامة المعاينة هذه.",
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "Summary": {
        "additionalProperties": false,
        "properties": {
          "active_licenses": {
            "description": "عدد التراخيص النشطة غير المنتهية، بما فيها المنتظرة للتفعيل الأول.",
            "type": "integer"
          },
          "licenses": {
            "description": "عدد التراخيص غير المؤرشفة.",
            "type": "integer"
          },
          "policies": {
            "description": "عدد السياسات غير المؤرشفة.",
            "type": "integer"
          },
          "products": {
            "description": "عدد المنتجات في الملخص؛ مجموعات استخدام الأجهزة لكل منتج في استجابات الاستخدام.",
            "type": "integer"
          }
        },
        "required": [
          "products",
          "policies",
          "licenses",
          "active_licenses"
        ],
        "type": "object"
      },
      "SupportCase": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "type": "integer"
          },
          "approved_cents": {
            "type": "integer"
          },
          "cancellation_preview": {
            "description": "معاينة إلغاء مشفرة بصيغة JSON.",
            "type": "string"
          },
          "cancellation_scope": {
            "type": "string"
          },
          "change_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "first_response_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "held_cents": {
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "incident_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "manual_cents": {
            "type": "integer"
          },
          "manual_refund_pending": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "purchase_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "refund_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "refund_totals": {
            "description": "إجماليات لكل عملة مشفرة بصيغة JSON؛ لا تجمع عملات مختلفة مطلقًا.",
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "response_due_at": {
            "format": "date-time",
            "type": "string"
          },
          "review_due_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope_ids": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "SupportCaseDetail": {
        "additionalProperties": false,
        "properties": {
          "case": {
            "$ref": "#/components/schemas/SupportCase"
          },
          "messages": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "type": "string"
                },
                "case_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "staff": {
                  "type": "boolean"
                },
                "user_id": {
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "original_refund_receipts": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount_cents": {
                  "minimum": 0,
                  "type": "integer"
                },
                "currency": {
                  "type": "string"
                },
                "intent_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "refund_id": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "original_refunds": {
            "items": {
              "$ref": "#/components/schemas/ProviderRefund"
            },
            "type": "array"
          },
          "refund_payments": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount_cents": {
                  "minimum": 0,
                  "type": "integer"
                },
                "currency": {
                  "type": "string"
                },
                "id": {
                  "format": "uuid",
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "provider_order_id": {
                  "type": "string"
                },
                "refunded_cents": {
                  "minimum": 0,
                  "type": "integer"
                },
                "status": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "refund_provider": {
            "type": "string"
          },
          "refund_unverified": {
            "type": "boolean"
          },
          "refunds": {
            "items": {
              "$ref": "#/components/schemas/PayPalRefund"
            },
            "type": "array"
          }
        },
        "required": [],
        "type": "object"
      },
      "SupportCaseInput": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 10000,
            "type": "string"
          },
          "kind": {
            "enum": [
              "support",
              "privacy",
              "appeal"
            ],
            "type": "string"
          },
          "request_id": {
            "maxLength": 80,
            "type": "string"
          },
          "subject": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "subject",
          "body",
          "request_id"
        ],
        "type": "object"
      },
      "SupportCaseList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SupportCase"
            },
            "type": "array"
          },
          "now": {
            "format": "date-time",
            "type": "string"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "SupportContact": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "بريد الدعم العام وReply-To لبريد الفوترة. تخفي القيمة الفارغة جهة الاتصال. لا يغير عنوان SMTP From الحالي ولا ينشئ صندوق وارد.",
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "SupportReadInput": {
        "additionalProperties": false,
        "properties": {
          "last_message_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "last_message_id"
        ],
        "type": "object"
      },
      "SupportReply": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 10000,
            "type": "string"
          },
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "",
              "reviewing",
              "awaiting_info",
              "resolved"
            ],
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "type": "object"
      },
      "SupportUnread": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "case_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "unread_messages": {
                  "type": "integer"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "unread_cases": {
            "type": "integer"
          },
          "unread_messages": {
            "type": "integer"
          },
          "unread_notices": {
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "SystemSettings": {
        "additionalProperties": false,
        "properties": {
          "database": {
            "$ref": "#/components/schemas/DatabaseStatus"
          },
          "environment": {
            "type": "string"
          },
          "mail": {
            "$ref": "#/components/schemas/MailSettings"
          },
          "public_url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "mail",
          "database"
        ],
        "type": "object"
      },
      "TLSCertificateInfo": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "type": "string"
          },
          "chain_length": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "fingerprint_sha256": {
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "not_after": {
            "format": "date-time",
            "type": "string"
          },
          "not_before": {
            "format": "date-time",
            "type": "string"
          },
          "self_signed": {
            "type": "boolean"
          },
          "serial_number": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "domains",
          "subject",
          "issuer",
          "not_before",
          "not_after",
          "fingerprint_sha256",
          "serial_number",
          "algorithm",
          "chain_length",
          "self_signed"
        ],
        "type": "object"
      },
      "TLSCertificateInput": {
        "additionalProperties": false,
        "properties": {
          "certificate_pem": {
            "description": "شهادة PEM النهائية تليها شهاداتها الوسيطة بالترتيب. يجب أن تطابق public_url. يسمح التطوير المحلي فقط بشهادة موقعة ذاتيًا.",
            "maxLength": 32768,
            "type": "string",
            "writeOnly": true
          },
          "expected_version": {
            "description": "استخدم version من GET /system/tls. مطلوب للتحديثات؛ يعيد الاستبدال المتزامن 409.",
            "type": "string"
          },
          "private_key_pem": {
            "description": "مفتاح PEM مطابق غير مشفر (PKCS#8 أو RSA أو EC). لا يُعاد في أي استجابة مطلقًا.",
            "maxLength": 16384,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "certificate_pem",
          "private_key_pem"
        ],
        "type": "object"
      },
      "TLSCertificateResult": {
        "additionalProperties": false,
        "properties": {
          "certificate": {
            "$ref": "#/components/schemas/TLSCertificateInfo"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "certificate",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "TLSCertificateUpdateInput": {
        "additionalProperties": false,
        "properties": {
          "certificate_pem": {
            "description": "شهادة PEM النهائية تليها شهاداتها الوسيطة بالترتيب. يجب أن تطابق public_url. يسمح التطوير المحلي فقط بشهادة موقعة ذاتيًا.",
            "maxLength": 32768,
            "type": "string",
            "writeOnly": true
          },
          "expected_version": {
            "description": "استخدم version من GET /system/tls. مطلوب للتحديثات؛ يعيد الاستبدال المتزامن 409.",
            "type": "string"
          },
          "private_key_pem": {
            "description": "مفتاح PEM مطابق غير مشفر (PKCS#8 أو RSA أو EC). لا يُعاد في أي استجابة مطلقًا.",
            "maxLength": 16384,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "certificate_pem",
          "private_key_pem",
          "expected_version"
        ],
        "type": "object"
      },
      "TLSStatus": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "certificate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TLSCertificateInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "http_redirect_address": {
            "type": "string"
          },
          "public_url": {
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "public_url",
          "address",
          "http_redirect_address",
          "certificate",
          "version",
          "updated_at"
        ],
        "type": "object"
      },
      "TestMail": {
        "additionalProperties": false,
        "properties": {
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "to"
        ],
        "type": "object"
      },
      "Token": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "maxLength": 100,
            "minLength": 32,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "TokenPassword": {
        "additionalProperties": false,
        "properties": {
          "password": {
            "description": "12–128 بايت UTF-8، وليس محارف",
            "type": "string",
            "writeOnly": true
          },
          "password_confirmation": {
            "description": "مطلوب ويجب أن يطابق كلمة المرور تمامًا",
            "type": "string",
            "writeOnly": true
          },
          "token": {
            "maxLength": 100,
            "minLength": 32,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "token",
          "password",
          "password_confirmation"
        ],
        "type": "object"
      },
      "TransferCode": {
        "additionalProperties": false,
        "properties": {
          "activation_code": {
            "pattern": "^lv_tmp_[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "activation_id": {
            "format": "uuid",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "license_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "activation_id",
          "activation_code",
          "expires_at",
          "license_id"
        ],
        "type": "object"
      },
      "TranslationCheck": {
        "additionalProperties": false,
        "properties": {
          "connected": {
            "type": "boolean"
          },
          "languages": {
            "items": {
              "$ref": "#/components/schemas/TranslationLanguage"
            },
            "type": "array"
          },
          "provider_usage": {
            "additionalProperties": false,
            "properties": {
              "character_count": {
                "type": "integer"
              },
              "character_limit": {
                "type": "integer"
              }
            },
            "required": [
              "character_count",
              "character_limit"
            ],
            "type": "object"
          }
        },
        "required": [
          "connected",
          "languages",
          "provider_usage"
        ],
        "type": "object"
      },
      "TranslationLanguage": {
        "additionalProperties": false,
        "properties": {
          "lang": {
            "description": "رمز الهدف BCP 47 الذي يعيده DeepL v3، مثل en-US أو zh-Hant.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "usable_as_target": {
            "type": "boolean"
          }
        },
        "required": [
          "lang",
          "name",
          "usable_as_target"
        ],
        "type": "object"
      },
      "TranslationOptions": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "languages": {
            "items": {
              "$ref": "#/components/schemas/TranslationLanguage"
            },
            "type": "array"
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "languages",
          "provider"
        ],
        "type": "object"
      },
      "TranslationSettings": {
        "additionalProperties": false,
        "properties": {
          "checked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "key_configured": {
            "type": "boolean"
          },
          "languages": {
            "items": {
              "$ref": "#/components/schemas/TranslationLanguage"
            },
            "type": "array"
          },
          "local_usage": {
            "$ref": "#/components/schemas/TranslationUsage"
          },
          "monthly_limit": {
            "description": "ميزانية الأحرف الشهرية المحلية، مستقلة عن حصة حساب DeepL وتواريخ الفوترة.",
            "type": "integer"
          },
          "requests_per_minute": {
            "type": "integer"
          },
          "tier": {
            "enum": [
              "free",
              "pro"
            ],
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "tier",
          "key_configured",
          "monthly_limit",
          "requests_per_minute",
          "languages",
          "checked_at",
          "version",
          "local_usage"
        ],
        "type": "object"
      },
      "TranslationSettingsInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "يُخزن مشفرًا. تحافظ القيمة الفارغة على المفتاح المحفوظ ما لم تكن clear_key بقيمة true. يتطلب تغيير المفتاح/المستوى فحص اتصال ناجحًا آخر.",
            "maxLength": 1000,
            "type": "string",
            "writeOnly": true
          },
          "clear_key": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "expected_version": {
            "type": "string"
          },
          "monthly_limit": {
            "maximum": 1000000000,
            "minimum": 1,
            "type": "integer"
          },
          "requests_per_minute": {
            "maximum": 60,
            "minimum": 1,
            "type": "integer"
          },
          "tier": {
            "enum": [
              "free",
              "pro"
            ],
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "tier",
          "monthly_limit",
          "requests_per_minute",
          "expected_version"
        ],
        "type": "object"
      },
      "TranslationUsage": {
        "additionalProperties": false,
        "properties": {
          "characters": {
            "description": "الأحرف الناجحة المفوترة بالإضافة إلى حجوزات تحفظية للطلبات مجهولة النتيجة. لا تضيف إصابات الذاكرة المؤقتة استخدامًا.",
            "type": "integer"
          },
          "month": {
            "description": "شهر UTC التقويمي YYYY-MM.",
            "type": "string"
          }
        },
        "required": [
          "month",
          "characters"
        ],
        "type": "object"
      },
      "Trial": {
        "additionalProperties": false,
        "properties": {
          "base_url": {
            "type": "string"
          },
          "duration_days": {
            "const": 7,
            "type": "integer"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isolated": {
            "type": "boolean"
          },
          "key": {
            "type": "string",
            "writeOnly": true
          },
          "license_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "items": {
              "$ref": "#/components/schemas/SigningKey"
            },
            "type": "array"
          }
        },
        "required": [
          "product_id",
          "license_id",
          "key",
          "trusted_keys"
        ],
        "type": "object"
      },
      "UpgradeList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/PlanUpgrade"
            },
            "type": "array"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "UpgradePart": {
        "additionalProperties": false,
        "description": "حساب ترقية مجمد لفترة مدفوعة مسبقًا حالية أو مستقبلية واحدة. يمثل change.amount_cents فرق هذه الفترة؛ ولا يخصم المجموع المجمع إلا العرض الأصلي.",
        "properties": {
          "change": {
            "$ref": "#/components/schemas/PlanUpgrade",
            "description": "تغير السعر والاستحقاق لهذا الجزء من الترقية."
          },
          "ends_at": {
            "description": "الطابع الزمني لانتهاء الحزمة أو الدورة، UTC؛ وقد يكون null قبل التفعيل.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "source": {
            "description": "مصدر الاستحقاق، مثل purchase أو gift.",
            "enum": [
              "purchase",
              "gift",
              "auto_renewal"
            ],
            "type": "string"
          },
          "starts_at": {
            "description": "الطابع الزمني لبدء الحزمة أو الدورة، UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source",
          "starts_at",
          "ends_at",
          "change"
        ],
        "type": "object"
      },
      "UpgradeQuoteInput": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "plan": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "request_id": {
            "maxLength": 80,
            "type": "string"
          }
        },
        "required": [
          "plan",
          "currency",
          "price_version",
          "request_id"
        ],
        "type": "object"
      },
      "Usage": {
        "additionalProperties": false,
        "properties": {
          "active_devices": {
            "description": "لشهر UTC الحالي: إشغال المنتج/الجهاز المسجل الحالي، مستقلًا عن سجل الاستخدام الشهري للأجهزة. تظل التسجيلات العادية محسوبة دون اتصال حتى تحريرها. لا تُحسب الجلسات العائمة إلا خلال صلاحية إيجارها، وتُزال التكرارات حسب الأجهزة مع الرجوع إلى هوية الجهاز عند الحاجة. يعيد التحرير أو انتهاء آخر جلسة عائمة السعة؛ وتستمر التسجيلات الصالحة عبر حدود أشهر الحصة. تُستثنى تسجيلات تجربة SDK المعزولة. لشهر UTC آخر: سجل استخدام الأجهزة المتميزة المسجل في ذلك الشهر.",
            "type": "integer"
          },
          "api_calls": {
            "description": "استدعاءات activate وvalidate وheartbeat وdeactivate الناجحة في شهر UTC وبيئة الدفع المحددين. تُستثنى حالات الفشل والإعادات المتطابقة الصالحة والفحوص المحلية واستهلاك ميزات البرنامج. لمقارنة حصة الحزمة المشتراة استخدم purchased.api_calls الذي يتبع شهر حصة الحزمة.",
            "type": "integer"
          },
          "api_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuntimeAPIPeriod",
                "description": "لقطة حصة API الافتراضية لشهر UTC هذا؛ قد تكون null عند التعطيل."
              },
              {
                "description": "لقطة حصة API الافتراضية لشهر UTC هذا؛ قد تكون null عند التعطيل.",
                "type": "null"
              }
            ],
            "description": "حصة API الافتراضية لشهر UTC؛ تكون null إذا لم تتوفر. مع حزمة مشتراة استخدم purchased.api_calls وpurchased.included_api_calls لشهر الحصة الحالي."
          },
          "billable_devices": {
            "description": "عند عدم وجود شراء نشط في شهر UTC الحالي، إشغال الأجهزة الحالي ضمن الحصة الافتراضية. وللأشهر المغلقة أو التغطية المدفوعة مسبقًا، ذروة فوترة الفترة الافتراضية المحفوظة. تستخدم التقديرات الذروة المسجلة على الأقل؛ ولا يعيد تحرير الجهاز الرسوم المتكبدة.",
            "type": "integer"
          },
          "estimated_total_cents": {
            "description": "رسم الأجهزة الشهري الافتراضي المقدر بأجزاء المئة من وحدة العملة.",
            "type": "integer"
          },
          "estimated_total_micros": {
            "description": "رسم الأجهزة الشهري الافتراضي المقدر بأجزاء المليون؛ وليس مجموع رسوم الحزم كلها.",
            "type": "integer"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "operations": {
            "description": "أعداد الاستدعاءات المقاسة الناجحة مجمعة حسب activate وvalidate وheartbeat وdeactivate.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "count": {
                  "description": "العدد في المجموعة الحالية أو عدد السجلات التي عالجتها دفعة.",
                  "type": "integer"
                },
                "operation": {
                  "description": "اسم العملية؛ تدعم الدفعات create/renew/revoke/apply_policy والطلبات دون اتصال activate/deactivate.",
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "overage_devices": {
            "description": "الأجهزة التي تتجاوز الحصة المضمنة.",
            "type": "integer"
          },
          "period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Period",
                "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي."
              },
              {
                "description": "لقطة الفوترة الشهرية الافتراضية UTC؛ تستخدم قواعد القياس month/day/lifetime وتستخدم صفوف الاستخدام مفتاح الفترة الفعلي.",
                "type": "null"
              }
            ],
            "description": "حصة فوترة UTC الافتراضية/التاريخية المجمدة. تكون Null عند عدم وجود فترة كهذه وتعطيل العرض الافتراضي؛ وتظل عملية الشراء النشطة قابلة للاستخدام."
          },
          "products": {
            "description": "عدد المنتجات في الملخص؛ مجموعات استخدام الأجهزة لكل منتج في استجابات الاستخدام.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "active_devices": {
                  "description": "الإشغال الحالي لكل منتج لشهر UTC الحالي؛ واستخدام الأجهزة المتميزة التاريخي لشهر UTC سابق.",
                  "type": "integer"
                },
                "product_id": {
                  "description": "UUID المنتج في مساحة العمل الحالية.",
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [],
              "type": "object"
            },
            "type": "array"
          },
          "purchased": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanPurchase",
                "description": "حزمة الشهر المتحرك النشطة حاليًا، أو null."
              },
              {
                "description": "حزمة الشهر المتحرك النشطة حاليًا، أو null.",
                "type": "null"
              }
            ],
            "description": "الحزمة النشطة في بيئة الدفع الحالية، وتُعاد لشهر UTC الحالي فقط. يجب استخدام purchased.included_devices لحصة الأجهزة الرئيسية، وليس period.included_devices."
          },
          "purchased_active_devices": {
            "description": "عند وجود purchased: إشغال المنتج/الجهاز المسجل الحالي، مستقلًا عن سجل الاستخدام الشهري للأجهزة. تظل التسجيلات العادية محسوبة دون اتصال حتى تحريرها. لا تُحسب الجلسات العائمة إلا خلال صلاحية إيجارها، وتُزال التكرارات حسب الأجهزة مع الرجوع إلى هوية الجهاز عند الحاجة. يعيد التحرير أو انتهاء آخر جلسة عائمة السعة؛ وتستمر التسجيلات الصالحة عبر حدود أشهر الحصة. تُستثنى تسجيلات تجربة SDK المعزولة.",
            "type": "integer"
          },
          "sandbox": {
            "description": "بيئة Sandbox.",
            "type": "boolean"
          },
          "timezone": {
            "description": "المنطقة الزمنية لتجميع الاستخدام، UTC.",
            "type": "string"
          },
          "warning": {
            "description": "القيمة normal أو near_quota أو quota_reached لحصة الأجهزة الافتراضية.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "UsageDevice": {
        "additionalProperties": false,
        "properties": {
          "device_id": {
            "description": "بصمة جهاز ضمن نطاق المنتج يشتقها SDK، عادةً 64 محرفًا سداسيًا عشريًا صغيرًا.",
            "type": "string"
          },
          "first_seen_at": {
            "description": "الطابع الزمني لأول نشاط للجهاز في شهر UTC هذا.",
            "format": "date-time",
            "type": "string"
          },
          "last_seen_at": {
            "description": "الطابع الزمني لآخر نشاط جهاز رصده الخادم، UTC.",
            "format": "date-time",
            "type": "string"
          },
          "month": {
            "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
            "type": "string"
          },
          "product_id": {
            "description": "UUID المنتج في مساحة العمل الحالية.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "UsageDeviceList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/UsageDevice"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "Verified": {
        "additionalProperties": false,
        "properties": {
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "verified"
        ],
        "type": "object"
      },
      "VersionedActivationReleaseInput": {
        "additionalProperties": false,
        "properties": {
          "expected_generation": {
            "description": "جيل الربط المعروض في قائمة الأجهزة الحالية. مطلوب لروابط حساب Launch؛ لا تحرر الإصدارات القديمة ربطًا أحدث مطلقًا.",
            "minimum": 1,
            "type": "integer"
          },
          "operation_id": {
            "description": "UUID عملية ثابت للاستعادة عند إعادة المحاولة. مطلوب لروابط حساب Launch.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "WaffoCheck": {
        "additionalProperties": false,
        "properties": {
          "connected": {
            "description": "enabled",
            "type": "boolean"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [
          "connected",
          "mode"
        ],
        "type": "object"
      },
      "WaffoOrder": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          },
          "applied_at": {
            "anyOf": [
              {
                "description": "موعد UTC النهائي لنافذة إنشاء الدفع الأصلية.",
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "وقت UTC الذي فعّلت فيه الدفعة المتحقق منها الخدمة أو أضافت رصيد شحن المحفظة. تحدد قيمتا purchase_id وupgrade_id بقيمة Null عملية شحن."
          },
          "checkout_expires_at": {
            "description": "موعد UTC النهائي لنافذة إنشاء الدفع الأصلية.",
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "description": "موعد UTC النهائي لنافذة إنشاء الدفع الأصلية.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "id": {
            "description": "معرّف دفع الخدمة المحلي.",
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "paid_at": {
            "anyOf": [
              {
                "description": "موعد UTC النهائي لنافذة إنشاء الدفع الأصلية.",
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "وقت UTC الذي تحققت فيه الخلفية من معاملة Waffo مكتملة."
          },
          "provider_order_id": {
            "anyOf": [
              {
                "description": "معرّف التاجر الذي يبدأ بـ MER_.",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "معرّف ORD_ الأصلي المستعاد من استجابة API متحقق منها."
          },
          "purchase_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "شراء خدمة أو تجديد معلق موجود؛ يستبعد upgrade_id بصورة متبادلة."
          },
          "refunded_cents": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          },
          "request_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "status": {
            "description": "دورة حياة الدفع، بما فيها paid_unapplied عندما تحتاج الأموال المحصلة إلى مراجعة المشغّل واستردادها.",
            "enum": [
              "creating",
              "created",
              "completed",
              "paid_unapplied",
              "partially_refunded",
              "refunded"
            ],
            "type": "string"
          },
          "upgrade_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "عرض ترقية معلق موجود؛ يستبعد purchase_id بصورة متبادلة."
          }
        },
        "required": [
          "id",
          "request_id",
          "mode",
          "provider_order_id",
          "purchase_id",
          "upgrade_id",
          "currency",
          "amount_cents",
          "refunded_cents",
          "status",
          "checkout_expires_at",
          "paid_at",
          "applied_at",
          "created_at"
        ],
        "type": "object"
      },
      "WaffoOrderInput": {
        "additionalProperties": false,
        "description": "ادفع شراءً/ترقية مجمدة واحدة، أو أنشئ شحن محفظة بمبلغ وعملة ودون معرّفات خدمة. يعيد request_id الثابت الدفعة الأصلية؛ ويُرفض تغيير نيتها أو مبلغها أو عملتها. لا تضيف رصيدًا للمحفظة أو تفعّل الخدمة إلا المدفوعات المكتملة المتحقق منها بصورة مستقلة. تذهب عوائد الشحن إلى المحفظة. تعيد المحاولات استخدام مفتاح عدم تكرار الموفّر الأصلي داخل نافذة إنشاء الدفع الأصلية فقط.",
        "oneOf": [
          {
            "not": {
              "anyOf": [
                {
                  "required": [
                    "amount"
                  ]
                },
                {
                  "required": [
                    "currency"
                  ]
                }
              ]
            },
            "properties": {
              "purchase_id": {
                "format": "uuid",
                "type": "string"
              },
              "upgrade_id": {
                "type": "null"
              }
            },
            "required": [
              "purchase_id"
            ]
          },
          {
            "not": {
              "anyOf": [
                {
                  "required": [
                    "amount"
                  ]
                },
                {
                  "required": [
                    "currency"
                  ]
                }
              ]
            },
            "properties": {
              "purchase_id": {
                "type": "null"
              },
              "upgrade_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "upgrade_id"
            ]
          },
          {
            "properties": {
              "purchase_id": {
                "type": "null"
              },
              "upgrade_id": {
                "type": "null"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          }
        ],
        "properties": {
          "amount": {
            "description": "مطلوب لشحن المحفظة فقط. مبلغ عرض عشري ضمن الحدود المهيأة. ترفض طلبات الخدمة المبالغ المقدمة من العميل.",
            "pattern": "^\\d+(?:\\.\\d{1,2})?$",
            "type": "string"
          },
          "currency": {
            "description": "مطلوب لشحن المحفظة فقط ويجب تفعيله لهذا الموفّر.",
            "type": "string"
          },
          "overage_accepted": {
            "description": "تصريح صريح منفصل بالزيادة المدفوعة المعروضة.",
            "type": "boolean"
          },
          "policy_version": {
            "description": "إصدار السياسة المنشور حاليًا وغير القابل للتغيير. مطلوب للإجراءات المحمية بالموافقة بعد نشر المشغّل سياسة، في أي من بيئتي الدفع.",
            "type": "string"
          },
          "purchase_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "شراء خدمة أو تجديد معلق موجود؛ يستبعد upgrade_id بصورة متبادلة."
          },
          "request_id": {
            "description": "مفتاح طلب ثابت ينشئه المستدعي. تعيد الإعادات عملية الدفع الأصلية.",
            "maxLength": 80,
            "type": "string"
          },
          "terms_accepted": {
            "description": "موافقة صريحة غير محددة افتراضيًا.",
            "type": "boolean"
          },
          "upgrade_id": {
            "anyOf": [
              {
                "description": "معرّف دفع الخدمة المحلي.",
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "عرض ترقية معلق موجود؛ يستبعد purchase_id بصورة متبادلة."
          }
        },
        "required": [
          "request_id"
        ],
        "type": "object"
      },
      "WaffoOrderList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "items",
            "items": {
              "$ref": "#/components/schemas/WaffoOrder"
            },
            "type": "array"
          },
          "total": {
            "description": "سعر الخدمة الكامل المجمد بأصغر وحدة عملة؛ دون شحن محفظة أو دفع مختلط.",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "type": "object"
      },
      "WaffoOrderResult": {
        "additionalProperties": false,
        "properties": {
          "approval_url": {
            "description": "عنوان URL دفع مصادق عليه قصير العمر، أو فارغ بعد الدفع أو الانتهاء أو تعطيل القناة. لا تسجله أو تخزنه مؤقتًا مطلقًا.",
            "type": "string"
          },
          "order": {
            "$ref": "#/components/schemas/WaffoOrder",
            "description": "order"
          },
          "return_url": {
            "description": "عنوان URL للوحة المحفظة للشحن، وعنوان URL لتسوية السعر لدفع الخدمة. لا يثبت عنوان العودة وحده الدفع مطلقًا.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "order",
          "approval_url",
          "return_url"
        ],
        "type": "object"
      },
      "WaffoSettings": {
        "additionalProperties": false,
        "properties": {
          "currencies": {
            "description": "currencies",
            "items": {
              "description": "معرّف التاجر الذي يبدأ بـ MER_.",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "enabled",
            "type": "boolean"
          },
          "maximum_cents": {
            "description": "الحد الأعلى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100000 ويجب ألا يقل عن minimum_cents.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "merchant_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "minimum_cents": {
            "description": "الحد الأدنى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "private_key_configured": {
            "description": "enabled",
            "type": "boolean"
          },
          "product_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "store_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "version": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "webhook_public_key": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "webhook_url": {
            "description": "webhook url",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "mode",
          "merchant_id",
          "store_id",
          "product_id",
          "currencies",
          "private_key_configured",
          "webhook_public_key",
          "version",
          "webhook_url"
        ],
        "type": "object"
      },
      "WaffoSettingsInput": {
        "additionalProperties": false,
        "properties": {
          "clear_private_key": {
            "description": "enabled",
            "type": "boolean"
          },
          "currencies": {
            "description": "currencies",
            "items": {
              "description": "معرّف التاجر الذي يبدأ بـ MER_.",
              "type": "string"
            },
            "type": "array"
          },
          "enabled": {
            "description": "enabled",
            "type": "boolean"
          },
          "expected_version": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "maximum_cents": {
            "description": "الحد الأعلى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100000 ويجب ألا يقل عن minimum_cents.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "merchant_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "minimum_cents": {
            "description": "الحد الأدنى لشحن المحفظة بوحدات العملة الصغرى؛ الافتراضي 100.",
            "maximum": 100000000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "بيئة الدفع. تُعزل سجلات Sandbox وlive.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "private_key": {
            "description": "مفتاح RSA الخاص للتوقيع. مشفر عند التخزين؛ تحافظ القيمة الفارغة على المفتاح المحفوظ.",
            "maxLength": 8192,
            "type": "string",
            "writeOnly": true
          },
          "product_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "store_id": {
            "description": "معرّف التاجر الذي يبدأ بـ MER_.",
            "type": "string"
          },
          "webhook_public_key": {
            "description": "تجاوز اختياري للمفتاح العام الرسمي لـ webhook. تستخدم القيمة الفارغة مفتاح SDK للبيئة المحددة.",
            "maxLength": 8192,
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "mode",
          "merchant_id",
          "store_id",
          "product_id",
          "currencies",
          "expected_version"
        ],
        "type": "object"
      },
      "WaffoWebhookEvent": {
        "description": "حدث Waffo خام مصادق عليه باستخدام X-Waffo-Signature والمفتاح العام للبيئة المحددة وstore وmode. يُتحقق من الدفع/الاستردادات بصورة مستقلة عبر API.",
        "type": "object"
      },
      "Wallet": {
        "additionalProperties": false,
        "properties": {
          "balance_cents": {
            "description": "رصيد المحفظة أو الرصيد بعد القيد، بأجزاء المئة.",
            "type": "integer"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "WalletEntry": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "description": "المبلغ بأجزاء المئة؛ قد تكون قيود الدفتر أرصدة موجبة أو خصومات سالبة.",
            "type": "integer"
          },
          "balance_cents": {
            "description": "رصيد المحفظة أو الرصيد بعد القيد، بأجزاء المئة.",
            "type": "integer"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "رمز عملة من ثلاثة أحرف كبيرة، مثل USD.",
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "description": "يسجل plan_upgrade ترقية مدفوعة. يحجز paypal_refund_reserve أموال المحفظة المتاحة؛ ويزيل paypal_refund_release الحجز؛ ويسجل paypal_refund الاسترداد النقدي المؤكد. حركات الحجز/التحرير ليست مدفوعات نقدية وتتلاشى عند اكتمال التسوية.",
            "type": "string"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "reference": {
            "description": "مرجع الأعمال المرتبط المستخدم للتتبع.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "WalletEntryList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/WalletEntry"
            },
            "type": "array"
          },
          "limit": {
            "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
            "type": "integer"
          },
          "offset": {
            "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
            "type": "integer"
          },
          "total": {
            "description": "إجمالي السجلات المطابقة، وليس طول الصفحة الحالية.",
            "type": "integer"
          }
        },
        "required": [],
        "type": "object"
      },
      "WalletRefundRequest": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "minimum": 1,
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_email": {
            "description": "قائمة المسؤول فقط.",
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "order_id": {
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "refund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_status": {
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "review_status": {
            "enum": [
              "pending",
              "approved",
              "declined",
              "cancelled"
            ],
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "pending_review",
              "refund_pending",
              "refunded",
              "refund_failed",
              "declined",
              "cancelled"
            ],
            "type": "string"
          },
          "tenant_name": {
            "description": "قائمة المسؤول فقط.",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "order_id",
          "mode",
          "currency",
          "amount_cents",
          "reason",
          "status",
          "review_status"
        ],
        "type": "object"
      },
      "WalletRefundRequestInput": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "description": "مبلغ موجب تحده كل من قيمة الطلب غير المستردة ورصيد المحفظة الحالي غير المنفق.",
            "pattern": "^[0-9]+(?:\\.[0-9]{1,2})?$",
            "type": "string"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "reason": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "reason",
          "request_id",
          "mode"
        ],
        "type": "object"
      },
      "WalletRefundRequestList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WalletRefundRequest"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "mode": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "mode"
        ],
        "type": "object"
      },
      "WalletRefundReview": {
        "additionalProperties": false,
        "properties": {
          "approve": {
            "type": "boolean"
          },
          "decision": {
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          },
          "expected_updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "approve",
          "decision"
        ],
        "type": "object"
      },
      "WalletResult": {
        "additionalProperties": false,
        "properties": {
          "currencies": {
            "description": "رموز العملات المسموحة في هذه البيئة.",
            "items": {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            "type": "array"
          },
          "items": {
            "description": "السجلات المعادة؛ راجع items[] لحقول العناصر. قد تكون بعض المجموعات الفارغة null؛ راجع type.",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            },
            "type": "array"
          },
          "maximum_cents": {
            "description": "الحد الأعلى للشحن لقناة شحن المحفظة المفعلة، بالوحدات الصغرى.",
            "type": "integer"
          },
          "minimum_cents": {
            "description": "الحد الأدنى للشحن لقناة شحن المحفظة المفعلة، بالوحدات الصغرى.",
            "type": "integer"
          },
          "mode": {
            "description": "مدة الترخيص: perpetual أو timed أو trial؛ تستخدم كائنات الفوترة وضع الدفع sandbox أو live.",
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "payment_channels": {
            "description": "إعداد قناة الدفع المتاحة. اعرض القنوات المفعلة المطابقة لبيئة الفوترة النشطة وعملة الشراء فقط.",
            "items": {
              "$ref": "#/components/schemas/PaymentChannel"
            },
            "type": "array"
          },
          "paypal_enabled": {
            "description": "ما إذا كان PayPal مفعّلًا في بيئة الدفع هذه.",
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      },
      "WebhookAttempt": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "delivery_id": {
            "description": "UUID مهمة التسليم لهذه المحاولة.",
            "format": "uuid",
            "type": "string"
          },
          "duration_ms": {
            "description": "مدة التسليم بالمللي ثانية.",
            "type": "integer"
          },
          "error": {
            "description": "كائن خطأ أو فئة فشل التسليم؛ راجع الحقول الفرعية أو النوع الحالي.",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "number": {
            "description": "رقم تسلسل المحاولة التراكمي.",
            "type": "integer"
          },
          "status_code": {
            "description": "حالة HTTP لهذه المحاولة؛ قد تكون 0 عند فشل النقل.",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "delivery_id",
          "number",
          "status_code",
          "error",
          "duration_ms",
          "created_at"
        ],
        "type": "object"
      },
      "WebhookDelivery": {
        "additionalProperties": false,
        "properties": {
          "attempts": {
            "description": "عدد محاولات المهمة التراكمي.",
            "type": "integer"
          },
          "available_at": {
            "description": "أقرب وقت UTC يمكن تشغيل المهمة فيه.",
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "description": "وقت الإنشاء بتوقيت UTC؛ تستخدم الطلبات دون اتصال ثواني Unix.",
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "description": "الطابع الزمني للتسليم الناجح، أو null.",
                "format": "date-time",
                "type": "string"
              },
              {
                "description": "الطابع الزمني للتسليم الناجح، أو null.",
                "type": "null"
              }
            ],
            "description": "الطابع الزمني للتسليم الناجح، أو null."
          },
          "endpoint_id": {
            "description": "UUID واجهة webhook.",
            "format": "uuid",
            "type": "string"
          },
          "event_id": {
            "description": "UUID الحدث الأصلي؛ استخدمه لإزالة التكرار لدى المستقبل.",
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
            "format": "uuid",
            "type": "string"
          },
          "last_error": {
            "description": "أحدث فئة فشل؛ قد تكون فارغة.",
            "type": "string"
          },
          "last_status": {
            "description": "أحدث حالة استجابة HTTP؛ قد تكون 0 إذا لم تصل استجابة.",
            "type": "integer"
          },
          "status": {
            "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_id",
          "status",
          "attempts",
          "available_at",
          "last_status",
          "last_error",
          "delivered_at",
          "created_at"
        ],
        "type": "object"
      },
      "WebhookEvent": {
        "description": "حدث PayPal الموقع الدقيق، والمتحقق منه باستخدام PayPal API",
        "type": "object"
      },
      "WebhookReceived": {
        "additionalProperties": false,
        "properties": {
          "ignored": {
            "type": "boolean"
          },
          "received": {
            "type": "boolean"
          }
        },
        "required": [],
        "type": "object"
      }
    },
    "securitySchemes": {
      "closureExport": {
        "description": "بيانات اعتماد تنزيل مقيدة لمدة 15 دقيقة، وليست جلسة لوحة تحكم. يستخدم الإنتاج __Host-licentivo_closure_export؛ وتُحد دائمًا بموعد الإغلاق الأصلي.",
        "in": "cookie",
        "name": "licentivo_closure_export",
        "type": "apiKey"
      },
      "customerSession": {
        "description": "يستخدم الإنتاج __Host-licenova_customer؛ وهوية المشتري مستقلة عن جلسة المورّد.",
        "in": "cookie",
        "name": "licenova_customer",
        "type": "apiKey"
      },
      "managementKey": {
        "bearerFormat": "lv_api_...",
        "scheme": "bearer",
        "type": "http"
      },
      "session": {
        "description": "يستخدم الإنتاج __Host-licenova_session",
        "in": "cookie",
        "name": "licenova_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "واجهة إدارة وترخيص Licentivo. تدعم منح التشغيل الموقعة والتراخيص المرتبطة بالعقدة والعائمة وحصص أجهزة التفعيل الحالية واستخدام API الشهري وميزات البرامج المقاسة وجلسات حساب Launch والحزم المدفوعة مسبقًا والهدايا والتجديد التلقائي للمحفظة وترقيات التغطية الكاملة. تدعم PayPal وPaddle وWaffo المدفوعات المتحقق منها والاسترداد عبر المسار الأصلي. تشمل سياسات العملاء والإلغاء ضمن نطاق الموافقة والدعم والتعويض وتصدير البيانات والإغلاق المنطقي للحساب. تُعزل بيئات الدفع والعملات؛ وتُشفّر بيانات الاعتماد الخاصة ولا تُعاد مطلقًا.",
    "title": "واجهة API الخاصة بـ Licentivo",
    "version": "0.12.0",
    "x-document-language": "ar"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/account/closure-export.zip": {
      "get": {
        "description": "يُعاد فحص بيانات الاعتماد وموعد الإغلاق الأصلي لكل طلب وبعد الإنشاء. لا يمكن لاستعادة نسخة احتياطية إعادة بدء النافذة.",
        "operationId": "get__api_v1_account_closure_export_zip",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "closureExport": []
          }
        ],
        "summary": "التنزيل خلال نافذة الإغلاق البالغة 30 يومًا"
      }
    },
    "/api/v1/account/closure-export/session": {
      "post": {
        "description": "يتطلب البريد/كلمة المرور الأصليين المتحقق منهما وإغلاقًا مؤكدًا لا يزال ضمن 30 يومًا بالضبط. يُحد ملف cookie البالغ 15 دقيقة بالموعد الأصلي ويخضع لتحديد المعدل ولا يصرح بوصول API/لوحة التحكم العادي.",
        "operationId": "post__api_v1_account_closure_export_session",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClosureExportLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClosureExportCredential"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "التحقق من حساب مغلق للتصدير المقيد"
      }
    },
    "/api/v1/account/data-export": {
      "get": {
        "description": "تشمل تنزيلات Owner ملفات CSV لأعمال مساحة العمل. يحتوي الأرشيف الشخصي للعضو على ملفه ومنشوراته وطلباته. تُستثنى أسرار/تجزئات بيانات الاعتماد ومفاتيح التوقيع الخاصة.",
        "operationId": "get__api_v1_account_data_export",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تنزيل البيانات الشخصية والمصرح بها الخاصة",
        "x-required-role": "session"
      }
    },
    "/api/v1/account/deletions": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_account_deletions",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountClosureList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة طلبات الإغلاق المنطقي الخاصة",
        "x-required-role": "session"
      },
      "post": {
        "description": "يجب أن يحدد إغلاق Owner مساحة العمل؛ ولا يمكن للعضو إغلاق سوى حسابه. يلغي التأكيد الجلسات/مفاتيح API مع الاحتفاظ بالبيانات. يُسمح بالتصدير لمدة 30 يومًا بعد التأكيد.",
        "operationId": "post__api_v1_account_deletions",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountClosureInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountClosure"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "طلب إغلاق منطقي للحساب أو مساحة العمل",
        "x-required-role": "session"
      }
    },
    "/api/v1/account/deletions/{id}/cancel": {
      "post": {
        "description": "",
        "operationId": "post__api_v1_account_deletions__id__cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "سحب إغلاق غير مؤكد",
        "x-required-role": "session"
      }
    },
    "/api/v1/account/legal-acceptances": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_account_legal_acceptances",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LegalAcceptanceList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة إيصالات الموافقة القانونية الخاصة",
        "x-required-role": "session"
      }
    },
    "/api/v1/account/profile": {
      "patch": {
        "description": "يتطلب كلمة المرور الحالية. يتلقى بريد الدخول الجديد رابط تحقق أحادي الاستخدام صالحًا لمدة 30 دقيقة. يبقى بريد الدخول المتحقق الحالي والوصول دون تغيير حتى التأكيد.",
        "operationId": "patch__api_v1_account_profile",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCorrection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تصحيح الاسم أو طلب تغيير بريد تسجيل الدخول الخاص",
        "x-required-role": "session"
      }
    },
    "/api/v1/activate": {
      "post": {
        "description": "تتم المصادقة بواسطة product_id + license_key + device_id. دون cookie/CSRF/مفتاح المورّد. يلزم activation_id باستثناء activate. يستهلك كل طلب ناجح استدعاء API واحدًا؛ ولا تستهلك الإعادة المتطابقة أو حالات الفشل شيئًا. تُخصم الزيادة من المحفظة ذريًا أو يعاد API_QUOTA_EXCEEDED/API_BALANCE_INSUFFICIENT. تتبع حصة أجهزة مساحة العمل التفعيلات الحالية. يعيد التحرير السعة؛ ويعيد انتهاء إيجار المقعد العائم السعة أيضًا، بينما يظل التسجيل العادي دون اتصال محسوبًا. لا تُفرض رسوم زيادة الأجهزة إلا عندما تتجاوز ذروة فوترة شهر الحصة السعة المدفوعة سابقًا؛ ولا يعيد التحرير الرسوم المتكبدة. استخدام API منفصل.",
        "operationId": "post_api_v1_activate",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RuntimeResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "تفعيل وقت التشغيل"
      }
    },
    "/api/v1/activations": {
      "get": {
        "operationId": "get_api_v1_activations",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "license_id",
            "schema": {
              "description": "UUID الترخيص، وهو مختلف عن السر lv_lic_.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "product_id",
            "schema": {
              "description": "UUID المنتج في مساحة العمل الحالية.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
              "enum": [
                "active",
                "released"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "description": "نص البحث؛ تعتمد الحقول المستهدفة والحد الأقصى للطول على العملية.",
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "device_name": "Office PC",
                        "generation": 1,
                        "id": "44444444-4444-4444-8444-444444444444",
                        "last_seen_at": "2026-10-18T00:00:00Z",
                        "license_id": "33333333-3333-4333-8333-333333333333",
                        "product_id": "11111111-1111-4111-8111-111111111111",
                        "released_at": null,
                        "status": "active",
                        "virtual_machine": false
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ActivationList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة عمليات التفعيل",
        "x-management-reference": {
          "group": "devices"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/activations/{id}/release": {
      "post": {
        "operationId": "post_api_v1_activations_by_id_release",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "expected_generation": 1,
                "operation_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/VersionedActivationReleaseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "status": "released"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StateResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تحرير التفعيل",
        "x-management-reference": {
          "group": "devices"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/api-keys": {
      "get": {
        "operationId": "get_api_v1_api-keys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "allow_http": false,
                        "created_at": "2026-10-18T00:00:00Z",
                        "expires_at": "2026-10-18T00:00:00Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "name": "Report app",
                        "prefix": "lv_api_AAAAAAA",
                        "revoked": false,
                        "scope": "read"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeyList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة مفاتيح API",
        "x-management-reference": {
          "group": "keys"
        },
        "x-required-role": "owner",
        "x-required-scope": "owner_session"
      },
      "post": {
        "operationId": "post_api_v1_api-keys",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "description": "مطلوب للكتابة المصادق عليها بملفات cookie؛ احصل على data.csrf_token من GET /api/v1/auth/csrf واحتفظ بملفات cookie.",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "allow_http": false,
                "expires_days": 90,
                "name": "Order system",
                "scope": "write"
              },
              "schema": {
                "$ref": "#/components/schemas/KeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "expires_at": "2027-01-16T00:00:00Z",
                    "id": "33333333-3333-4333-8333-333333333333",
                    "key": "lv_api_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "prefix": "lv_api_AAAAAAA"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeySecret",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء مفتاح API",
        "x-management-reference": {
          "group": "keys"
        },
        "x-required-role": "owner",
        "x-required-scope": "owner_session"
      }
    },
    "/api/v1/api-keys/{id}": {
      "delete": {
        "operationId": "delete_api_v1_api-keys_by_id",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "description": "مطلوب للكتابة المصادق عليها بملفات cookie؛ احصل على data.csrf_token من GET /api/v1/auth/csrf واحتفظ بملفات cookie.",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إلغاء مفتاح API",
        "x-management-reference": {
          "group": "keys"
        },
        "x-required-role": "owner",
        "x-required-scope": "owner_session"
      },
      "patch": {
        "description": "تتطلب جلسة Owner ورمز CSRF. تحدّث هذا المفتاح النشط فقط؛ ويحافظ التدوير على الإعداد. لا تغير اتصالات Launch أو منح التشغيل الحالية. لا يفعّل هذا الإعداد HTTP على API الخاص بـ Licentivo.",
        "operationId": "patch_api_v1_api-keys_by_id",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "description": "مطلوب للكتابة المصادق عليها بملفات cookie؛ احصل على data.csrf_token من GET /api/v1/auth/csrf واحتفظ بملفات cookie.",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "allow_http": true
              },
              "schema": {
                "$ref": "#/components/schemas/KeyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "allow_http": false,
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeyUpdated",
                      "description": "Response data for the completed operation."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تحديث صلاحية وصول المواقع عبر HTTP",
        "x-management-reference": {
          "group": "keys"
        },
        "x-required-role": "owner",
        "x-required-scope": "owner_session"
      }
    },
    "/api/v1/api-keys/{id}/rotate": {
      "post": {
        "operationId": "post_api_v1_api-keys_by_id_rotate",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "description": "مطلوب للكتابة المصادق عليها بملفات cookie؛ احصل على data.csrf_token من GET /api/v1/auth/csrf واحتفظ بملفات cookie.",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "key": "lv_api_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
                    "prefix": "lv_api_BBBBBBB"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeyRotated",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تدوير مفتاح API",
        "x-management-reference": {
          "group": "keys"
        },
        "x-required-role": "owner",
        "x-required-scope": "owner_session"
      }
    },
    "/api/v1/audit-logs": {
      "get": {
        "operationId": "get_api_v1_audit-logs",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "action": "license.create",
                        "actor_id": "33333333-3333-4333-8333-333333333333",
                        "actor_kind": "api_key",
                        "created_at": "2026-10-18T00:00:00Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "request_id": "55555555-5555-4555-8555-555555555555",
                        "resource_id": ""
                      }
                    ],
                    "limit": 25,
                    "offset": 0
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AuditList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة سجلات التدقيق",
        "x-management-reference": {
          "group": "usage"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/auth/accept-invitation": {
      "post": {
        "operationId": "post_api_v1_auth_accept-invitation",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PasswordSet"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "accept-invitation"
      }
    },
    "/api/v1/auth/change-password": {
      "post": {
        "operationId": "post_api_v1_auth_change-password",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PasswordSet"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إلغاء جميع بيانات اعتماد الحساب وتعيين كلمة مرور"
      }
    },
    "/api/v1/auth/confirm-email-change": {
      "post": {
        "description": "التحقق من التحدي المشفر أحادي الاستخدام. لا يغير بريد الدخول ويتحقق منه ويلغي الجلسات ومفاتيح API وروابط المصادقة الموجودة إلا التأكيد الناجح. لا يمكن للتحديات المنتهية أو المستبدلة أو المبطلة بكلمة المرور تغيير الحساب.",
        "operationId": "post__api_v1_auth_confirm_email_change",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeConfirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "تأكيد بريد دخول جديد"
      }
    },
    "/api/v1/auth/csrf": {
      "get": {
        "operationId": "get_api_v1_auth_csrf",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CSRF"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "إصدار رمز CSRF مرتبط بالجلسة"
      }
    },
    "/api/v1/auth/forgot-password": {
      "post": {
        "operationId": "post_api_v1_auth_forgot-password",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Email"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Notice"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "forgot-password"
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "post_api_v1_auth_login",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Login"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CSRF"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "login"
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "post_api_v1_auth_logout",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoggedOut"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إلغاء الجلسة الحالية"
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "operationId": "get_api_v1_auth_me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حساب cookie الحالي"
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "description": " تتطلب الشروط المنشورة policy_version وموافقة صريحة في أي من بيئتي الدفع. وتتطلب الزيادة المدفوعة للخدمة أيضًا overage_accepted. قبل نشر السياسة الأولى لا تُسجل الموافقة على المسودة، وتظل كل عملية خاضعة لفحوص التسجيل والتسعير والدفع المعتادة.",
        "operationId": "post_api_v1_auth_register",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Register"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Notice"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "register"
      }
    },
    "/api/v1/auth/resend-verification": {
      "post": {
        "operationId": "post_api_v1_auth_resend-verification",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Email"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Notice"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "resend-verification"
      }
    },
    "/api/v1/auth/reset-password": {
      "post": {
        "operationId": "post_api_v1_auth_reset-password",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PasswordSet"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "reset-password"
      }
    },
    "/api/v1/auth/verify-email": {
      "post": {
        "operationId": "post_api_v1_auth_verify-email",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Token"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verified"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "verify-email"
      }
    },
    "/api/v1/billing/auto-renewal": {
      "get": {
        "description": "الجلسة فقط. يتطلب PATCH مالك مساحة العمل Owner. معطل افتراضيًا. يتطلب التفعيل رصيدًا كافيًا بالوضع والعملة الحاليين لتجديد واحد، وأحدث خطة مدفوعة والمدة المعروضة وإصدار السعر بعد مراجعتها. عند الانتهاء تُخصم أموال المحفظة فقط، وليس PayPal أو بطاقة. يعالج عامل كل دقيقة وتغييرات التشغيل التجديدات المستحقة تحت قفل المستأجر. تخصم المحاولات المتكررة مرة واحدة. تنتظر الأموال غير الكافية الشحن؛ وتوقف تغييرات السعر أو الخطة أو التوفر الخصم حتى موافقة جديدة. يلغي التعطيل الخصومات التلقائية المستقبلية وليس التغطية المدفوعة.",
        "operationId": "get_api_v1_billing_auto_renewal",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "next_renewal_at": null,
                    "setting": {
                      "amount_cents": 0,
                      "currency": "USD",
                      "enabled": true,
                      "mode": "sandbox",
                      "plan": "starter",
                      "plan_name": "Starter",
                      "policy_version": "",
                      "price_version": "example-v1",
                      "status": "disabled",
                      "term_months": 1,
                      "updated_at": "2026-10-18T00:00:00Z",
                      "version": ""
                    }
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AutoRenewalResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة إعدادات التجديد التلقائي",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "description": "الجلسة فقط. يتطلب PATCH مالك مساحة العمل Owner. معطل افتراضيًا. يتطلب التفعيل رصيدًا كافيًا بالوضع والعملة الحاليين لتجديد واحد، وأحدث خطة مدفوعة والمدة المعروضة وإصدار السعر بعد مراجعتها. عند الانتهاء تُخصم أموال المحفظة فقط، وليس PayPal أو بطاقة. يعالج عامل كل دقيقة وتغييرات التشغيل التجديدات المستحقة تحت قفل المستأجر. تخصم المحاولات المتكررة مرة واحدة. تنتظر الأموال غير الكافية الشحن؛ وتوقف تغييرات السعر أو الخطة أو التوفر الخصم حتى موافقة جديدة. يلغي التعطيل الخصومات التلقائية المستقبلية وليس التغطية المدفوعة. تتطلب الشروط المنشورة policy_version وموافقة صريحة في أي من بيئتي الدفع. وتتطلب الزيادة المدفوعة للخدمة أيضًا overage_accepted. قبل نشر السياسة الأولى لا تُسجل الموافقة على المسودة، وتظل كل عملية خاضعة لفحوص التسجيل والتسعير والدفع المعتادة.",
        "operationId": "patch_api_v1_billing_auto_renewal",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRenewalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AutoRenewal"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تفعيل أو تعطيل تجديد المحفظة الموافق عليه صراحة"
      }
    },
    "/api/v1/billing/invoices": {
      "get": {
        "operationId": "get_api_v1_billing_invoices",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "month",
            "schema": {
              "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
              "pattern": "^[0-9]{4}-[0-9]{2}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "active_devices": 0,
                        "base_covered": false,
                        "base_micros": 0,
                        "created_at": "2026-10-18T00:00:00Z",
                        "currency": "USD",
                        "finalized_at": null,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "included_devices": 0,
                        "month": "2026-09",
                        "overage_devices": 0,
                        "paid_at": null,
                        "payment_mode": "sandbox",
                        "plan": "starter",
                        "plan_name": "Starter",
                        "price_version": "example-v1",
                        "refunded_at": null,
                        "status": "draft",
                        "total_cents": 0,
                        "total_micros": 0,
                        "unit_micros": 0,
                        "voided_at": null
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvoiceList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة الفواتير",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/invoices/{id}": {
      "get": {
        "operationId": "get_api_v1_billing_invoices_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "active_devices": 0,
                    "base_covered": false,
                    "base_micros": 0,
                    "created_at": "2026-10-18T00:00:00Z",
                    "currency": "USD",
                    "finalized_at": null,
                    "id": "33333333-3333-4333-8333-333333333333",
                    "included_devices": 0,
                    "month": "2026-09",
                    "overage_devices": 0,
                    "paid_at": null,
                    "payment_mode": "sandbox",
                    "plan": "starter",
                    "plan_name": "Starter",
                    "price_version": "example-v1",
                    "refunded_at": null,
                    "status": "draft",
                    "total_cents": 0,
                    "total_micros": 0,
                    "unit_micros": 0,
                    "voided_at": null
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Invoice",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة الفاتورة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/invoices/{id}/export.csv": {
      "get": {
        "operationId": "get_api_v1_billing_invoices_by_id_export_csv",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "example": "invoice_id,month,currency,status,plan,price_version,active_devices,included_devices,overage_devices,base_micros,unit_micros,total_micros,total_cents\n",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تصدير الفاتورة",
        "x-csv-columns": [
          "invoice_id",
          "month",
          "currency",
          "status",
          "plan",
          "price_version",
          "active_devices",
          "included_devices",
          "overage_devices",
          "base_micros",
          "unit_micros",
          "total_micros",
          "total_cents"
        ],
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/invoices/{id}/finalize": {
      "post": {
        "operationId": "post_api_v1_billing_invoices_by_id_finalize",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "status": "finalized"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StateResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "اعتماد الفاتورة نهائيًا",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/billing/invoices/{id}/pay": {
      "post": {
        "description": " تتطلب الدفعة الجديدة موافقة صريحة على السياسة الحالية. تحتفظ إعادة العملية المدفوعة بإيصالها الأصلي.",
        "operationId": "post_api_v1_billing_invoices_by_id_pay",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalConsent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Invoice"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "دفع فاتورة تاريخية مؤكدة من الرصيد",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/invoices/{id}/void": {
      "post": {
        "operationId": "post_api_v1_billing_invoices_by_id_void",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "status": "void"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StateResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إلغاء الفاتورة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/billing/jobs": {
      "get": {
        "operationId": "get_api_v1_billing_jobs",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "attempts": 0,
                        "available_at": "2026-10-18T00:00:00Z",
                        "created_at": "2026-10-18T00:00:00Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "last_error": "",
                        "month": "2026-09",
                        "status": "pending"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingJobList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة مهام الفوترة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "post": {
        "operationId": "post_api_v1_billing_jobs",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "month": "2026-09"
              },
              "schema": {
                "$ref": "#/components/schemas/MonthInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "attempts": 0,
                    "available_at": "2026-10-18T00:00:00Z",
                    "created_at": "2026-10-18T00:00:00Z",
                    "id": "33333333-3333-4333-8333-333333333333",
                    "last_error": "",
                    "month": "2026-09",
                    "status": "pending"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingJob",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إدراج مهمة فوترة في الطابور",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/billing/jobs/{id}/retry": {
      "post": {
        "operationId": "post_api_v1_billing_jobs_by_id_retry",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "status": "pending"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StateResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إعادة محاولة مهمة فوترة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/billing/notification-preferences": {
      "get": {
        "description": "جلسة Owner فقط؛ تُرفض مفاتيح الإدارة. تكون الأنواع الأربعة وzh مفعلة افتراضيًا حتى الحفظ الصريح. تخص التفضيلات هذا المستخدم ومساحة العمل. يعيد استخدام نقل بريد المصادقة والمرسل والطابور الدائم المشفر وإعادة المحاولة. يجب أن يسمح كل من إذن المنصة وموافقة المستلم بالنوع. يعيد التسليم فحص الموافقة الحالية وحالة الحدث. لا تمنح خيارات البريد موافقة على خصم المحفظة ولا تلغيها. تُوسم رسائل Sandbox. لا تُنشأ إشعارات للمشتريات المعلقة غير المدفوعة أو الهدايا.",
        "operationId": "get__api_v1_billing_notification_preferences",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingNotificationPreferencesResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة موافقة بريد المالك الحالي",
        "x-required-role": "owner"
      },
      "patch": {
        "description": "تحديث جزئي لمالك الجلسة؛ لا يمكن استهداف مستخدم آخر. تتحكم اللغة المحلية في الرسائل المستقبلية. يظل بريد التحقق والأمان الحالي مستقلًا. يعيد استخدام نقل بريد المصادقة والمرسل والطابور الدائم المشفر وإعادة المحاولة. يجب أن يسمح كل من إذن المنصة وموافقة المستلم بالنوع. يعيد التسليم فحص الموافقة الحالية وحالة الحدث. لا تمنح خيارات البريد موافقة على خصم المحفظة ولا تلغيها. تُوسم رسائل Sandbox. لا تُنشأ إشعارات للمشتريات المعلقة غير المدفوعة أو الهدايا.",
        "operationId": "patch__api_v1_billing_notification_preferences",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingNotificationPreferenceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingNotificationPreference"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حفظ موافقة بريد المالك الحالي",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/overage-consent": {
      "post": {
        "description": "",
        "operationId": "post__api_v1_billing_overage_consent",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerOverageConsent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التصريح صراحة بزيادة المحفظة الحالية",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/overage-settings": {
      "get": {
        "description": "المستأجر الحالي فقط. يمكن للأعضاء ذوي صلاحية القراءة عرضها. لا تقيد تفضيلات زيادة العميل حصة API غير المحدودة مطلقًا. تعني الخطة null أن الحصة الافتراضية غير متاحة.",
        "operationId": "get__api_v1_billing_overage_settings",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "customer_api_settings_enabled": false,
                    "customer_device_settings_enabled": false,
                    "plan": null,
                    "preference": {
                      "block_api_overage": false,
                      "block_device_overage": false,
                      "mode": "sandbox",
                      "updated_at": "2026-10-18T00:00:00Z",
                      "version": ""
                    }
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OverageSettings",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة تفضيلات الزيادة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "description": "جلسة Owner فقط. يتطلب كل خيار مُقدم إذن المسؤول المقابل؛ ويرفض أي حقل غير مصرح به الطلب كله برمز 403. الحد الصارم للتشغيل = حد المسؤول OR تفضيل حظر العميل عند تفعيل ذلك الإذن. لا يمحو الاستخدام أو الرسوم السابقة. تفضيلات Sandbox وlive مستقلة.",
        "operationId": "patch__api_v1_billing_overage_settings",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverageSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OveragePreference"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حفظ تفضيلات زيادة الأجهزة وAPI المستقلة"
      }
    },
    "/api/v1/billing/paddle/orders": {
      "get": {
        "operationId": "get__api_v1_billing_paddle_orders",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderList"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة مدفوعات خدمة Paddle وشحن المحفظة",
        "x-licentivo-access": "session"
      },
      "post": {
        "operationId": "post__api_v1_billing_paddle_orders",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaddleOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء أو استعادة دفعة خدمة Paddle واحدة",
        "x-licentivo-access": "owner"
      }
    },
    "/api/v1/billing/paddle/orders/{id}": {
      "get": {
        "operationId": "get__api_v1_billing_paddle_orders__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة معاملة الدفع المملوكة ورمز العميل العام",
        "x-licentivo-access": "session"
      }
    },
    "/api/v1/billing/paddle/orders/{id}/reconcile": {
      "post": {
        "operationId": "post__api_v1_billing_paddle_orders__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaddleReconcileInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من الدفع وتنفيذ الخدمة المشتراة مرة واحدة",
        "x-licentivo-access": "owner"
      }
    },
    "/api/v1/billing/paypal/orders": {
      "get": {
        "operationId": "get_api_v1_billing_paypal_orders",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount_cents": 0,
                        "approval_url": "",
                        "capture_id": null,
                        "created_at": "2026-10-18T00:00:00Z",
                        "credited_at": null,
                        "currency": "USD",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "mode": "sandbox",
                        "paypal_order_id": null,
                        "purchase_id": null,
                        "refunded_cents": 0,
                        "request_id": "55555555-5555-4555-8555-555555555555",
                        "status": "creating",
                        "upgrade_id": null
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalOrderList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة طلبات الشحن",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": " تتطلب الشروط المنشورة policy_version وموافقة صريحة في أي من بيئتي الدفع. وتتطلب الزيادة المدفوعة للخدمة أيضًا overage_accepted. قبل نشر السياسة الأولى لا تُسجل الموافقة على المسودة، وتظل كل عملية خاضعة لفحوص التسجيل والتسعير والدفع المعتادة.",
        "operationId": "post_api_v1_billing_paypal_orders",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RechargeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalOrder"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء/استعادة شحن غير مكرر",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/paypal/orders/{id}/capture": {
      "post": {
        "operationId": "post_api_v1_billing_paypal_orders_by_id_capture",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalOrder"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد الأموال المرتبطة بالتاجر مرة واحدة",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/paypal/orders/{id}/reconcile": {
      "post": {
        "operationId": "post_api_v1_billing_paypal_orders_by_id_reconcile",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalOrder"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد الأموال المرتبطة بالتاجر مرة واحدة",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/paypal/orders/{id}/refund-requests": {
      "post": {
        "description": "جلسات Cookie فقط؛ لا تُقبل مفاتيح API للإدارة. تقتصر قراءات العميل على مساحة عمله. تتطلب كتابات العميل Owner متحققًا منه لمساحة العمل، دون إذن مسؤول المنصة. لا تنقل الطلبات الأموال ولا تحجزها. تعيد موافقة المسؤول فحص المحفظة الحالية وقيمة التحصيل غير المستردة، ثم تستخدم عملية الاسترداد والحجز الحالية غير المكررة عبر المسار الأصلي. لا تلغي الموافقة الخطط.",
        "operationId": "post__api_v1_billing_paypal_orders__id__refund_requests",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletRefundRequestInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRefundRequest"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "طلب استرداد رصيد الشحن غير المنفق الخاص بي",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/plans": {
      "get": {
        "operationId": "get_api_v1_billing_plans",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "كتالوج أسعار عام يديره المسؤول"
      }
    },
    "/api/v1/billing/purchases": {
      "get": {
        "operationId": "get_api_v1_billing_purchases",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "active": null,
                    "active_devices": 0,
                    "coverage_ends_at": null,
                    "items": [
                      {
                        "api_calls": 0,
                        "api_hard_limit": false,
                        "api_overage_cents": 0,
                        "api_unit_micros": 0,
                        "base_cents": 0,
                        "cancelled_at": null,
                        "created_at": "2026-10-18T00:00:00Z",
                        "currency": "USD",
                        "current_cycle_index": 0,
                        "current_upgrade_id": "",
                        "cycle_ends_at": "2026-10-18T00:00:00Z",
                        "cycle_starts_at": "2026-10-18T00:00:00Z",
                        "effective_included_devices": 0,
                        "effective_plan": "",
                        "effective_plan_name": "",
                        "ends_at": null,
                        "entitlement_cents": 0,
                        "gift_batch_id": "",
                        "gift_follows_current": false,
                        "hard_limit": false,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "included_api_calls": null,
                        "included_devices": 0,
                        "mode": "sandbox",
                        "overage_cents": 0,
                        "plan": "starter",
                        "plan_name": "Starter",
                        "price_version": "example-v1",
                        "refunded_cents": 0,
                        "renewal": false,
                        "renewal_of": "",
                        "request_id": "55555555-5555-4555-8555-555555555555",
                        "service_credit_basis_cents": 0,
                        "service_credit_basis_seconds": 0,
                        "source": "purchase",
                        "starts_at": null,
                        "status": "pending",
                        "term_months": 1,
                        "total_api_calls": 0,
                        "total_api_overage_cents": 0,
                        "total_device_overage_cents": 0,
                        "unit_micros": 0
                      }
                    ],
                    "mode": "sandbox",
                    "renewal_package": null,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة مشتريات الحزم",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": "إنشاء عملية شراء بالخطة والعملة ومراجعة السعر والمدة المحددة. تُحاول التسوية الفورية من المحفظة؛ ويعيد الرصيد غير الكافي pending دون بدء التغطية. اضبط renewal=true لتمديد حزمة نشطة. يجدول الدفع الناجح الخدمة بعد التغطية الموجودة؛ ويبلغ GET /billing/purchases عن coverage_ends_at. يظل استخدام الحصة الحالي وانتهاء ترخيص البرنامج دون تغيير. تعيد المحاولات استخدام request_id ولا يمكنها الخصم مرتين. تتطلب الشروط المنشورة policy_version وموافقة صريحة في أي من بيئتي الدفع. وتتطلب الزيادة المدفوعة للخدمة أيضًا overage_accepted. قبل نشر السياسة الأولى لا تُسجل الموافقة على المسودة، وتظل كل عملية خاضعة لفحوص التسجيل والتسعير والدفع المعتادة.",
        "operationId": "post_api_v1_billing_purchases",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuyPlan"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanPurchase"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "شراء حزمة أو دفع تجديد مقدم",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/refund-requests": {
      "get": {
        "description": "جلسات Cookie فقط؛ لا تُقبل مفاتيح API للإدارة. تقتصر قراءات العميل على مساحة عمله. تتطلب كتابات العميل Owner متحققًا منه لمساحة العمل، دون إذن مسؤول المنصة. لا تنقل الطلبات الأموال ولا تحجزها. تعيد موافقة المسؤول فحص المحفظة الحالية وقيمة التحصيل غير المستردة، ثم تستخدم عملية الاسترداد والحجز الحالية غير المكررة عبر المسار الأصلي. لا تلغي الموافقة الخطط.",
        "operationId": "get__api_v1_billing_refund_requests",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRefundRequestList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة طلبات استرداد مساحة عملي"
      }
    },
    "/api/v1/billing/refund-requests/{id}/cancel": {
      "post": {
        "description": "جلسات Cookie فقط؛ لا تُقبل مفاتيح API للإدارة. تقتصر قراءات العميل على مساحة عمله. تتطلب كتابات العميل Owner متحققًا منه لمساحة العمل، دون إذن مسؤول المنصة. لا تنقل الطلبات الأموال ولا تحجزها. تعيد موافقة المسؤول فحص المحفظة الحالية وقيمة التحصيل غير المستردة، ثم تستخدم عملية الاسترداد والحجز الحالية غير المكررة عبر المسار الأصلي. لا تلغي الموافقة الخطط.",
        "operationId": "post__api_v1_billing_refund_requests__id__cancel",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRefundRequest"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "سحب طلب الاسترداد المعلق الخاص بي",
        "x-required-role": "owner"
      }
    },
    "/api/v1/billing/renewal-plans": {
      "get": {
        "description": "تقتصر الملكية على الشراء المكتمل والترقية المطبقة. يعيد العروض المنشورة المفعلة والعروض المخفية للتجديد فقط لعملائها الحاليين. لا تنشئ العروض المعلقة ملكية. جدّد باستخدام POST /billing/purchases مقدمًا أو بعد الانتهاء.",
        "operationId": "get__api_v1_billing_renewal_plans",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "api_hard_limit": false,
                        "api_unit_micros": 0,
                        "base_micros": 0,
                        "currency": "USD",
                        "description": "Desktop reporting software",
                        "enabled": true,
                        "hard_limit": false,
                        "included_api_calls": null,
                        "included_devices": 0,
                        "name": "Report app",
                        "plan": "starter",
                        "price_version": "example-v1",
                        "public": false,
                        "renewal_only": false,
                        "sort_order": 0,
                        "terms": [],
                        "unit_micros": 0,
                        "updated_at": "2026-10-18T00:00:00Z"
                      }
                    ],
                    "mode": "sandbox"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RenewalPlans",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة عروض التجديد",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/subscription": {
      "get": {
        "operationId": "get_api_v1_billing_subscription",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "current": {
                      "base_covered": false,
                      "base_micros": 0,
                      "created_at": "2026-10-18T00:00:00Z",
                      "currency": "USD",
                      "hard_limit": false,
                      "included_devices": 0,
                      "month": "2026-09",
                      "payment_mode": "sandbox",
                      "plan": "starter",
                      "plan_name": "Starter",
                      "price_version": "example-v1",
                      "unit_micros": 0
                    },
                    "next": null,
                    "sandbox": false
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Subscription",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "الحصة الافتراضية معطلة (DEFAULT_PLAN_DISABLED)"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة الاشتراك الشهري",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "operationId": "patch_api_v1_billing_subscription",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "currency": "USD",
                "plan": "starter",
                "price_version": "example-v1"
              },
              "schema": {
                "$ref": "#/components/schemas/PlanChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "currency": "USD",
                    "effective_month": "2026-11",
                    "plan": "starter",
                    "sandbox": false
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScheduledPlan",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "جدولة الخطة الشهرية",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/billing/upgrades": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_billing_upgrades",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount_cents": 0,
                        "api_hard_limit": false,
                        "api_unit_micros": 0,
                        "applied_at": null,
                        "base_cents": 0,
                        "created_at": "2026-10-18T00:00:00Z",
                        "currency": "USD",
                        "cycle_seconds": 0,
                        "ends_at": "2026-10-18T00:00:00Z",
                        "expires_at": "2026-10-18T00:00:00Z",
                        "hard_limit": false,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "included_api_calls": null,
                        "included_devices": 0,
                        "mode": "sandbox",
                        "parent_id": "33333333-3333-4333-8333-333333333333",
                        "parts": [],
                        "plan": "starter",
                        "plan_name": "Starter",
                        "previous_base_cents": 0,
                        "previous_plan_name": "",
                        "previous_upgrade_id": "",
                        "price_version": "example-v1",
                        "purchase_id": "33333333-3333-4333-8333-333333333333",
                        "remaining_seconds": 0,
                        "request_id": "55555555-5555-4555-8555-555555555555",
                        "status": "pending",
                        "unit_micros": 0
                      }
                    ],
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UpgradeList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة ترقيات الحزم",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/upgrades/quote": {
      "post": {
        "description": "تتطلب جلسة Owner. يجب أن يستخدم الهدف العملة نفسها، وألا يكون السعر الشهري أو حصة الأجهزة/API أقل. تحتفظ بتاريخ الانتهاء والاستخدام الأصليين. تشمل الترقية دائمًا التغطية الحالية وجميع التغطيات المستقبلية المدفوعة مسبقًا/المهداة. تُضاف قيمة المنفعة الأصلية لكل فترة محسوبة نسبيًا للثواني المتبقية؛ وتستخدم الفترة غير المبدوءة مدتها الكاملة. قيمة الهدية ليست نقدًا قابلًا للاسترداد. الدفع خصم ذري واحد من المحفظة؛ وتبقى التواريخ والحصة المستهلكة. يبطل التجديد أو الهدايا أو الإلغاء بين العرض والدفع العرض برمز UPGRADE_STATE_CONFLICT؛ ويبقى شحن PayPal المرتبط المتأخر رصيدًا في المحفظة. تتطلب التغطية المتغيرة عرضًا جديدًا.",
        "operationId": "post__api_v1_billing_upgrades_quote",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpgradeQuoteInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanUpgrade"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معاينة ترقية خطة محسوبة نسبيًا دون خصم المحفظة"
      }
    },
    "/api/v1/billing/upgrades/{id}/pay": {
      "post": {
        "description": "يعيد pending دون تغيير الخطة عندما لا يكفي الرصيد. يعيد applied بعد الخصم مرة واحدة. تعيد الخطة النشطة المتغيرة أو العرض المنتهي 409. تشمل الترقية دائمًا التغطية الحالية وجميع التغطيات المستقبلية المدفوعة مسبقًا/المهداة. تُضاف قيمة المنفعة الأصلية لكل فترة محسوبة نسبيًا للثواني المتبقية؛ وتستخدم الفترة غير المبدوءة مدتها الكاملة. قيمة الهدية ليست نقدًا قابلًا للاسترداد. الدفع خصم ذري واحد من المحفظة؛ وتبقى التواريخ والحصة المستهلكة. يبطل التجديد أو الهدايا أو الإلغاء بين العرض والدفع العرض برمز UPGRADE_STATE_CONFLICT؛ ويبقى شحن PayPal المرتبط المتأخر رصيدًا في المحفظة. تتطلب التغطية المتغيرة عرضًا جديدًا. تتطلب الدفعة الجديدة موافقة صريحة على السياسة الحالية. تحتفظ إعادة العملية المدفوعة بإيصالها الأصلي.",
        "operationId": "post__api_v1_billing_upgrades__id__pay",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalConsent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanUpgrade"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد عرض ترقية صالح ودفعه مرة واحدة"
      }
    },
    "/api/v1/billing/waffo/orders": {
      "get": {
        "operationId": "get__api_v1_billing_waffo_orders",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderList"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة مدفوعات خدمة Waffo وشحن المحفظة",
        "x-licentivo-access": "session"
      },
      "post": {
        "operationId": "post__api_v1_billing_waffo_orders",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaffoOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء أو استعادة دفعة خدمة Waffo واحدة",
        "x-licentivo-access": "owner"
      }
    },
    "/api/v1/billing/waffo/orders/{id}": {
      "get": {
        "operationId": "get__api_v1_billing_waffo_orders__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة دفع Waffo لمساحة العمل الخاصة",
        "x-licentivo-access": "session"
      }
    },
    "/api/v1/billing/waffo/orders/{id}/reconcile": {
      "post": {
        "operationId": "post__api_v1_billing_waffo_orders__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من الدفع وتسوية الخدمة والاستردادات",
        "x-licentivo-access": "owner"
      }
    },
    "/api/v1/billing/wallet": {
      "get": {
        "operationId": "get_api_v1_billing_wallet",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "currencies": [],
                    "items": [
                      {
                        "balance_cents": 0,
                        "currency": "USD",
                        "mode": "sandbox"
                      }
                    ],
                    "maximum_cents": 0,
                    "minimum_cents": 0,
                    "mode": "sandbox",
                    "payment_channels": [],
                    "paypal_enabled": false
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة أرصدة المحفظة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/billing/wallet/entries": {
      "get": {
        "operationId": "get_api_v1_billing_wallet_entries",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount_cents": 0,
                        "balance_cents": 0,
                        "created_at": "2026-10-18T00:00:00Z",
                        "currency": "USD",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "kind": "",
                        "mode": "sandbox",
                        "reference": ""
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletEntryList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة قيود المحفظة",
        "x-management-reference": {
          "group": "billing"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/consume": {
      "post": {
        "description": "عملية تشغيل مصادق عليها بالترخيص؛ دون cookie للمورّد أو API Key. يتطلب استهلاك الميزة Idempotency-Key ثابتًا؛ ولا يخصم consume من API المنصة.",
        "operationId": "post_api_v1_consume",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConsumptionResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "/consume"
      }
    },
    "/api/v1/consume/cancel": {
      "post": {
        "description": "احجز قبل إجراء العمل؛ واعتمد بعد النجاح فقط؛ وألغِ عند الفشل. احتفظ بمعرّف المهمة وجسم الطلب نفسيهما بين المحاولات. اعتماد انتهت مهلته نتيجته غير مؤكدة: أعد محاولة الاعتماد، ولا تلغِ أو تكرر عملًا مكتملًا. تعيد الحجوزات المكتملة حالتها الحالية؛ ولا يوجد خصم من API المنصة. يصدر الاكتمال license.consume؛ ولا تصدر الحجوزات المؤقتة أحداث استهلاك.",
        "operationId": "post_api_v1_consume_cancel",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReservationResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "وحدات الميزة: الإلغاء"
      }
    },
    "/api/v1/consume/commit": {
      "post": {
        "description": "احجز قبل إجراء العمل؛ واعتمد بعد النجاح فقط؛ وألغِ عند الفشل. احتفظ بمعرّف المهمة وجسم الطلب نفسيهما بين المحاولات. اعتماد انتهت مهلته نتيجته غير مؤكدة: أعد محاولة الاعتماد، ولا تلغِ أو تكرر عملًا مكتملًا. تعيد الحجوزات المكتملة حالتها الحالية؛ ولا يوجد خصم من API المنصة. يصدر الاكتمال license.consume؛ ولا تصدر الحجوزات المؤقتة أحداث استهلاك.",
        "operationId": "post_api_v1_consume_commit",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReservationResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "وحدات الميزة: الاعتماد"
      }
    },
    "/api/v1/consume/reserve": {
      "post": {
        "description": "احجز قبل إجراء العمل؛ واعتمد بعد النجاح فقط؛ وألغِ عند الفشل. احتفظ بمعرّف المهمة وجسم الطلب نفسيهما بين المحاولات. اعتماد انتهت مهلته نتيجته غير مؤكدة: أعد محاولة الاعتماد، ولا تلغِ أو تكرر عملًا مكتملًا. تعيد الحجوزات المكتملة حالتها الحالية؛ ولا يوجد خصم من API المنصة. يصدر الاكتمال license.consume؛ ولا تصدر الحجوزات المؤقتة أحداث استهلاك.",
        "operationId": "post_api_v1_consume_reserve",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReservationResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "وحدات الميزة: الحجز"
      }
    },
    "/api/v1/customer/activations/{id}/release": {
      "post": {
        "operationId": "post_api_v1_customer_activations_by_id_release",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerReleaseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerReleaseResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "customerSession": []
          }
        ],
        "summary": "/customer/activations/{id}/release"
      }
    },
    "/api/v1/customer/cases": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_customer_cases",
        "parameters": [
          {
            "description": "استبعد نوع طلب واحدًا قبل العد والتقسيم إلى صفحات. استخدم refund لإبقاء حالات الاسترداد خارج قائمة الدعم؛ ويظل الوصول مقيدًا بالجلسة الحالية.",
            "in": "query",
            "name": "exclude_kind",
            "schema": {
              "maxLength": 24,
              "type": "string"
            }
          },
          {
            "description": "قصر حالات الاسترداد على شحن المحفظة أو إلغاء الخدمة.",
            "in": "query",
            "name": "refund_scope",
            "required": false,
            "schema": {
              "enum": [
                "wallet",
                "service"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة طلبات العملاء",
        "x-required-role": "session"
      },
      "post": {
        "description": "يُقيد request_id الثابت بمساحة العمل؛ ولا يمكن للمحتوى المتغير إعادة استخدامه.",
        "operationId": "post__api_v1_customer_cases",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportCaseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCase"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء طلب دعم أو خصوصية أو استئناف",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/cases/unread": {
      "get": {
        "description": "تُستثنى محادثات الاسترداد. يرى العملاء تذاكر مساحة العمل المصرح بها فقط؛ ويرى الأعضاء تذاكرهم الخاصة. لكل مسؤول علامة قراءة مستقلة.",
        "operationId": "get__api_v1_customer_cases_unread",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportUnread"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة أعداد التذاكر الشخصية والإشعارات غير المقروءة",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/cases/{id}": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_customer_cases__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة الطلب والردود",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/cases/{id}/messages": {
      "post": {
        "description": "ترفض حالات الاسترداد الردود برمز REFUND_REVIEW_WORKFLOW؛ ويوافق المسؤولون أو يرفضون مباشرة. تحتفظ تذاكر الدعم العادية بالردود. تحتفظ عمليات الإغلاق المراجعة بحالة سير عمل الخصوصية.",
        "operationId": "post__api_v1_customer_cases__id__messages",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportReply"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "الرد على تذكرة دعم",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/cases/{id}/read": {
      "post": {
        "description": "تُعلّم الرسائل حتى آخر رسالة معروضة فقط بأنها مقروءة. تبقى الرسائل الأحدث غير مقروءة ولا يمكن للتأكيد المتأخر إرجاع علامة القراءة إلى الخلف.",
        "operationId": "post__api_v1_customer_cases__id__read",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportReadInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد رسائل التذاكر المعروضة",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/compensations": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_customer_compensations",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "incident_id": "33333333-3333-4333-8333-333333333333",
                        "intervals": "",
                        "mode": "timed",
                        "purchase_id": "33333333-3333-4333-8333-333333333333",
                        "seconds": 0
                      }
                    ]
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceCompensationList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة تعويضات الخدمة",
        "x-management-reference": {
          "group": "service"
        },
        "x-required-role": "session",
        "x-required-scope": "read"
      }
    },
    "/api/v1/customer/licenses": {
      "get": {
        "operationId": "get_api_v1_customer_licenses",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerLicenses"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "customerSession": []
          }
        ],
        "summary": "تراخيص المشتري المرتبطة"
      }
    },
    "/api/v1/customer/login": {
      "post": {
        "operationId": "post_api_v1_customer_login",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Email"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Notice"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "/customer/login"
      }
    },
    "/api/v1/customer/logout": {
      "post": {
        "operationId": "post_api_v1_customer_logout",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoggedOut"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "customerSession": []
          }
        ],
        "summary": "/customer/logout"
      }
    },
    "/api/v1/customer/notices": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_customer_notices",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "body": "",
                        "created_at": "2026-10-18T00:00:00Z",
                        "effective_at": null,
                        "emailed_at": null,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "kind": "",
                        "read_at": null,
                        "reference": "",
                        "title": ""
                      }
                    ]
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceNoticeList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة إشعارات الخدمة",
        "x-management-reference": {
          "group": "service"
        },
        "x-required-role": "session",
        "x-required-scope": "read"
      }
    },
    "/api/v1/customer/notices/{id}/read": {
      "post": {
        "description": "",
        "operationId": "post__api_v1_customer_notices__id__read",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "وضع علامة قراءة على إشعارك",
        "x-required-role": "session"
      }
    },
    "/api/v1/customer/offline/respond": {
      "post": {
        "operationId": "post_api_v1_customer_offline_respond",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfflineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OfflineResponse"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "customerSession": []
          }
        ],
        "summary": "/customer/offline/respond"
      }
    },
    "/api/v1/customer/refunds": {
      "post": {
        "description": "يتطلب النطاق الصريح تأكيدًا مع quote_hash وquoted_at المعادين. تظل الخدمة نشطة حتى موافقة المسؤول. تتطلب الحالة المتغيرة أو العروض المنتهية معاينة جديدة؛ وتُرفض الطلبات المعلقة المتعارضة. تسمح الطلبات دون نطاق بالإلغاء الفوري المؤهل بعد تأكيد صريح. يمكن لـ order_id أيضًا اختيار دفعة Waffo/Paddle بحالة paid_unapplied وreason=failed_delivery؛ ولا يجمد ذلك رصيد محفظة لم يُمنح أصلًا.",
        "operationId": "post__api_v1_customer_refunds",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerRefundInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCase"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إرسال طلب استرداد للمراجعة المباشرة",
        "x-required-role": "owner"
      }
    },
    "/api/v1/customer/refunds/quote": {
      "post": {
        "description": "يعيد نطاق الشراء/الخدمة الصريح تجزئة لقطة محدودة والمشتريات المتأثرة وتقديرات الاسترداد لكل عملة والتواريخ المتبقية. لا ينهي الإرسال الخدمة. لا قيمة نقدية للهدايا؛ وتظل الترقيات المدفوعة قابلة للاسترداد بعد المراجعة.",
        "operationId": "post__api_v1_customer_refunds_quote",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerRefundQuoteInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerRefundQuote"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معاينة نطاق الإلغاء والاسترداد والخدمة المتبقية",
        "x-required-role": "owner"
      }
    },
    "/api/v1/customer/refunds/{id}/cancel": {
      "post": {
        "operationId": "post__api_v1_customer_refunds__id__cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelCustomerRefund"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "سحب طلب الاسترداد المتبقي غير المراجع الخاص بي",
        "x-required-role": "owner"
      }
    },
    "/api/v1/customer/verify": {
      "post": {
        "operationId": "post_api_v1_customer_verify",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Token"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerSession"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "/customer/verify"
      }
    },
    "/api/v1/deactivate": {
      "post": {
        "description": "تتم المصادقة بواسطة product_id + license_key + device_id. دون cookie/CSRF/مفتاح المورّد. يلزم activation_id باستثناء activate. يستهلك كل طلب ناجح استدعاء API واحدًا؛ ولا تستهلك الإعادة المتطابقة أو حالات الفشل شيئًا. تُخصم الزيادة من المحفظة ذريًا أو يعاد API_QUOTA_EXCEEDED/API_BALANCE_INSUFFICIENT. تتبع حصة أجهزة مساحة العمل التفعيلات الحالية. يعيد التحرير السعة؛ ويعيد انتهاء إيجار المقعد العائم السعة أيضًا، بينما يظل التسجيل العادي دون اتصال محسوبًا. لا تُفرض رسوم زيادة الأجهزة إلا عندما تتجاوز ذروة فوترة شهر الحصة السعة المدفوعة سابقًا؛ ولا يعيد التحرير الرسوم المتكبدة. استخدام API منفصل.",
        "operationId": "post_api_v1_deactivate",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RuntimeResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "إلغاء التفعيل وقت التشغيل"
      }
    },
    "/api/v1/demo/trial": {
      "post": {
        "operationId": "post_api_v1_demo_trial",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Trial"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء تجربة SDK معزولة واحدة مدتها سبعة أيام لكل مالك",
        "x-required-role": "owner"
      }
    },
    "/api/v1/examples/sdk": {
      "get": {
        "operationId": "get_api_v1_examples_sdk",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SDKExampleInfo"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "توفر مثال SDK العام"
      }
    },
    "/api/v1/examples/sdk/download/{name}": {
      "get": {
        "operationId": "get_api_v1_examples_sdk_download_{name}",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "description": "اللغة مع .zip، مثل csharp.zip",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "تنزيل المصدر مع إعدادات المنتج العامة المضمنة في الرمز"
      }
    },
    "/api/v1/examples/sdk/trial": {
      "post": {
        "description": "يتطلب CSRF للمتصفح وملف cookie للزائر من نوع HttpOnly. يحصل كل زائر على ترخيص منفصل؛ وتبدأ الأيام الثلاثة عند أول تفعيل. لا تمدد المطالبات المتكررة الصلاحية مطلقًا. يفعّل export وليس pro.",
        "operationId": "post_api_v1_examples_sdk_trial",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SDKExampleTrial"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "المطالبة بتجربة هذا الزائر المستقلة لثلاثة أيام أو استعادتها"
      }
    },
    "/api/v1/forum/images": {
      "post": {
        "operationId": "post__api_v1_forum_images",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "image": {
                    "description": "PNG أو JPEG أو GIF؛ بحد أقصى 5 MB و4096 × 4096 و16 مليون بكسل. يُخزن GIF كصورة PNG ثابتة. تبقى خاصة حتى إرفاقها بمنشور منشور.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "image"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ForumImage"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "رفع صورة مسودة خاصة",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/replies/{id}": {
      "delete": {
        "operationId": "delete__api_v1_forum_replies__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حذف رد (المؤلف أو مسؤول المنصة)",
        "tags": [
          "Community"
        ]
      },
      "patch": {
        "operationId": "patch__api_v1_forum_replies__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumReplyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تعديل ردك",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/topics": {
      "get": {
        "operationId": "get__api_v1_forum_topics",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ForumTopicList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [],
        "summary": "قائمة المناقشات العامة، والمثبتة أولًا",
        "tags": [
          "Community"
        ]
      },
      "post": {
        "operationId": "post__api_v1_forum_topics",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumTopicInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إنشاء مناقشة (أي عضو مستأجر متحقق منه)",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/topics/{id}": {
      "delete": {
        "operationId": "delete__api_v1_forum_topics__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حذف مناقشة (المؤلف أو مسؤول المنصة)",
        "tags": [
          "Community"
        ]
      },
      "get": {
        "operationId": "get__api_v1_forum_topics__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ForumTopicDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [],
        "summary": "قراءة مناقشة عامة وردودها",
        "tags": [
          "Community"
        ]
      },
      "patch": {
        "operationId": "patch__api_v1_forum_topics__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumTopicInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تعديل مناقشتك",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/topics/{id}/moderation": {
      "post": {
        "operationId": "post__api_v1_forum_topics__id__moderation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumModerationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تثبيت المناقشات أو إلغاء تثبيتها أو إخفاؤها أو قفلها (مسؤول المنصة)",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/topics/{id}/replies": {
      "post": {
        "operationId": "post__api_v1_forum_topics__id__replies",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumReplyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "رمز الخطأ ومعرّف الطلب؛ لا تُكشف تفاصيل الحساب"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "الرد على مناقشة",
        "tags": [
          "Community"
        ]
      }
    },
    "/api/v1/forum/topics/{id}/translate": {
      "post": {
        "description": "يمكن للزوار المجهولين استخدام هذه الواجهة برمز CSRF. لا يُقبل إلا نص المنتدى المنشور والمخزن، وليس نصًا عشوائيًا مرسلًا. تُخزن الترجمة مؤقتًا حسب المحتوى واللغة المستهدفة. تعيد الموضوعات/الردود المخفية 404؛ وقد تعيد الترجمة المتزامنة TRANSLATION_PENDING. تُحفظ النصوص الأصلية.",
        "operationId": "post__api_v1_forum_topics__id__translate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForumTranslationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ForumTranslationResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [],
        "summary": "ترجمة موضوع أو رد منشور"
      }
    },
    "/api/v1/forum/translation": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_forum_translation",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationOptions"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [],
        "summary": "الحصول على لغات الترجمة المستهدفة المتاحة للعامة"
      }
    },
    "/api/v1/heartbeat": {
      "post": {
        "description": "تتم المصادقة بواسطة product_id + license_key + device_id. دون cookie/CSRF/مفتاح المورّد. يلزم activation_id باستثناء activate. يستهلك كل طلب ناجح استدعاء API واحدًا؛ ولا تستهلك الإعادة المتطابقة أو حالات الفشل شيئًا. تُخصم الزيادة من المحفظة ذريًا أو يعاد API_QUOTA_EXCEEDED/API_BALANCE_INSUFFICIENT. تنتهي إيصالات إعادة محاولة التحقق وضربات القلب بعد 3600 ثانية. ما دام الترخيص الأصلي صالحًا، تعاد الطلبات المطابقة داخل هذه النافذة دون خصم آخر. بعد النافذة استخدم مفتاحًا جديدًا؛ وقد يعالج المفتاح المستخدم سابقًا كطلب جديد. تبقى إيصالات التفعيل وإلغاء التفعيل واستخدام الميزات دائمة. تتبع حصة أجهزة مساحة العمل التفعيلات الحالية. يعيد التحرير السعة؛ ويعيد انتهاء إيجار المقعد العائم السعة أيضًا، بينما يظل التسجيل العادي دون اتصال محسوبًا. لا تُفرض رسوم زيادة الأجهزة إلا عندما تتجاوز ذروة فوترة شهر الحصة السعة المدفوعة سابقًا؛ ولا يعيد التحرير الرسوم المتكبدة. استخدام API منفصل.",
        "operationId": "post_api_v1_heartbeat",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RuntimeResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "ضربات القلب وقت التشغيل"
      }
    },
    "/api/v1/launch/connections": {
      "get": {
        "description": "قائمة اتصالات ثقة Launch. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_get__api_v1_launch_connections",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {},
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "description": "نتيجة هذه العملية.",
                      "properties": {
                        "items": {
                          "description": "السجلات المطابقة في النطاق المطلوب.",
                          "items": {
                            "$ref": "#/components/schemas/LaunchConnection"
                          },
                          "type": "array"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "قائمة اتصالات ثقة Launch",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": "تسجيل مُصدر Launch وبيئة التجارة. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_post__api_v1_launch_connections",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "audience": "licentivo:launch",
                "enabled": true,
                "environment": "live",
                "issuer": "https://shop.example.test",
                "public_keys": {
                  "launch-1": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "audience": "licentivo:launch",
                    "enabled": true,
                    "environment": "live",
                    "id": "11111111-1111-4111-8111-111111111111",
                    "issuer": "https://shop.example.test"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchConnection",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "تسجيل مُصدر Launch وبيئة التجارة",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}": {
      "put": {
        "description": "المُصدر والجمهور والبيئة غير قابلة للتغيير. قدّم مجموعة المفاتيح العامة الموثوقة كاملة.",
        "operationId": "launch_put__api_v1_launch_connections_id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "audience": "licentivo:launch",
                "enabled": true,
                "environment": "live",
                "issuer": "https://shop.example.test",
                "public_keys": {
                  "launch-1": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "audience": "licentivo:launch",
                    "enabled": true,
                    "environment": "live",
                    "id": "11111111-1111-4111-8111-111111111111",
                    "issuer": "https://shop.example.test"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchConnection",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "تدوير مفاتيح Launch أو تحديث حدود التشغيل",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/devices/{activation}/release": {
      "post": {
        "description": "يحجز Licentivo حصة التحرير الذاتي لمدة 30 يومًا ويسجل العملية ويتولى إعادة المحاولة والمراجعة اليدوية. يقارن العامل إصدار الربط ويلغي الجلسات وبيانات الاعتماد ضمن أقفال المعاملة نفسها. لا تستطيع جلسات دخول Launch القديمة تبادل تأكيد هوية آخر على الجهاز الملغى.",
        "operationId": "launch_post__api_v1_launch_connections_id_devices_activation_release",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "activation",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "account_ref": "account_ref_example",
                "entitlement_ref": "entitlement_ref_example",
                "environment": "live",
                "expected_generation": 1,
                "operation_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchDeviceReleaseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "activation_id": "11111111-1111-4111-8111-111111111111",
                    "expected_generation": 1,
                    "license_id": "11111111-1111-4111-8111-111111111111",
                    "operation_id": "11111111-1111-4111-8111-111111111111",
                    "source": "logout",
                    "status": "pending"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeviceReleaseOperation",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "طلب تحرير جهاز حساب عن بُعد بإصدار محدد",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/entitlements/{entitlement}/devices": {
      "get": {
        "description": "قراءة أجهزة الحساب وحصة التحرير المرجعية والعمليات. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_get__api_v1_launch_connections_id_entitlements_entitlement_devices",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entitlement",
            "required": true,
            "schema": {
              "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "account_ref",
            "required": true,
            "schema": {
              "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": true,
            "schema": {
              "description": "بيئة التجارة المثبتة في الاتصال والمنحة الموقعة معًا.",
              "enum": [
                "live",
                "sandbox"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {},
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "description": "نتيجة هذه العملية.",
                      "properties": {
                        "can_release": {
                          "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
                          "type": "boolean"
                        },
                        "items": {
                          "description": "السجلات المطابقة في النطاق المطلوب.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "device_name": {
                                "description": "تسمية جهاز مقروءة للبشر.",
                                "type": "string"
                              },
                              "generation": {
                                "description": "نسخة ربط الجهاز الحالية.",
                                "type": "integer"
                              },
                              "id": {
                                "description": "UUID مورد Licentivo.",
                                "format": "uuid",
                                "type": "string"
                              },
                              "last_seen_at": {
                                "description": "وقت إنشاء السجل بتوقيت UTC.",
                                "format": "date-time",
                                "type": "string"
                              },
                              "status": {
                                "description": "حالة دورة الحياة أو المعالجة الحالية التي يملكها الخادم.",
                                "type": "string"
                              }
                            },
                            "required": [],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "operations": {
                          "description": "سجل عمليات تحرير الأجهزة الذي يملكه الخادم.",
                          "items": {
                            "$ref": "#/components/schemas/DeviceReleaseOperation"
                          },
                          "type": "array"
                        },
                        "remaining": {
                          "description": "عمليات التحرير الذاتي المتبقية في آخر 30 يومًا، يحسبها Licentivo.",
                          "type": "integer"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "قراءة أجهزة الحساب وحصة التحرير المرجعية والعمليات",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/launch/connections/{id}/events": {
      "post": {
        "description": "احفظها دائمًا قبل الإقرار. تتعارض المعرّفات المكررة ذات الأجسام المختلفة. يطبق العمال الصلاحية المطلقة وإصدارات التجميع المتزايدة رتيبًا ضمن معاملات، ويتجاهلون الإصدارات القديمة ويعيدون محاولة الفشل حتى 12 محاولة قبل المراجعة اليدوية. بالنسبة لاستحقاق موجود، تلغي الاستردادات والتعليق والانتهاء الوصول بصورة مستقلة عن تعيينات الخطط وإصدارات السياسات وأوضاع الصلاحية وإشغال الأجهزة، مع الحفاظ على فحوص الملكية والإصدار. يطبق خفض الخطة الميزات الجديدة وقواعد العد وحد الأجهزة الفعلي معًا، ويحتفظ بأقدم الروابط ويلغي جلسات وبيانات الأجهزة الزائدة دون استهلاك حصة التحرير الذاتي. تحافظ التجديدات وتغييرات الخطة وحفظ السياسة على الحدود اليدوية المستقلة للميزات والأجهزة. تحافظ لقطات entitlement.downgraded الصريحة على الحالة التجارية النشطة لكنها تحجب الحقوق القديمة بصورة دائمة إذا فشل التطبيق. تحصل اللقطات النشطة الموجودة ذات التخفيضات القابلة للإثبات على الحماية نفسها. لا يزيل هذا الحاجز إلا تطبيق لقطة بإصدار يساوي أو يفوق إصدار التقييد المعلق. تحافظ إعادة المحاولة غير المكررة وقت التشغيل على إزالة تكرار العملية مع تحديث مواعيد الترخيص والشراء المتغيرة. استعلم عن الحدث قبل إعلان جاهزية الترخيص.",
        "operationId": "launch_post__api_v1_launch_connections_id_events",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "account_ref": "account_ref_example",
                "entitlement_ref": "entitlement_ref_example",
                "environment": "live",
                "event_id": "11111111-1111-4111-8111-111111111111",
                "launch_product_id": "11111111-1111-4111-8111-111111111111",
                "plan_ref": "plan_ref_example",
                "type": "entitlement.created",
                "valid_from": "2026-10-24T00:00:00Z",
                "version": 1
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchCommerceEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "attempts": 1,
                    "available_at": "2026-10-24T00:00:00Z",
                    "connection_id": "11111111-1111-4111-8111-111111111111",
                    "event_id": "11111111-1111-4111-8111-111111111111",
                    "status": "pending"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchEvent",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "استلام لقطة تجارة Launch كاملة",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/events/{event}": {
      "get": {
        "description": "قراءة نتيجة حدث تجارة Launch. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_get__api_v1_launch_connections_id_events_event_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "attempts": 1,
                    "available_at": "2026-10-24T00:00:00Z",
                    "connection_id": "11111111-1111-4111-8111-111111111111",
                    "event_id": "11111111-1111-4111-8111-111111111111",
                    "status": "pending"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchEvent",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "قراءة نتيجة حدث تجارة Launch",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/launch/connections/{id}/events/{event}/retry": {
      "post": {
        "description": "إعادة محاولة حدث Launch غير مطبق. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_post__api_v1_launch_connections_id_events_event_retry",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {},
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "description": "نتيجة هذه العملية.",
                      "properties": {
                        "queued": {
                          "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
                          "type": "boolean"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "إعادة محاولة حدث Launch غير مطبق",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/plans/{plan}": {
      "put": {
        "description": "تعيين إصدار خطة Launch إلى سياسة ترخيص. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_put__api_v1_launch_connections_id_plans_plan_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "plan",
            "required": true,
            "schema": {
              "description": "مرجع استحقاق شراء غير قابل للتغيير وحساس لحالة الأحرف.",
              "pattern": "^[A-Za-z0-9_-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "launch_product_id": "11111111-1111-4111-8111-111111111111",
                "policy_id": "11111111-1111-4111-8111-111111111111",
                "policy_version": 1,
                "product_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchPlanMappingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {},
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "description": "نتيجة هذه العملية.",
                      "properties": {
                        "saved": {
                          "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
                          "type": "boolean"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "تعيين إصدار خطة Launch إلى سياسة ترخيص",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/session-revocations": {
      "post": {
        "description": "إلغاء ذري متزامن: يعني HTTP 200 اعتماد الجلسات وبيانات الاعتماد وروابط الأجهزة المطابقة والإيصال الدائم. يحدد الاتصال البيئة؛ ويجب أن تطابقه بيئة اختيارية غير فارغة. يتكافأ الإغفال والقيمة الصريحة المطابقة لعدم التكرار. أعد استخدام event_id والجسم الموحّد نفسه للمحاولات، بما فيها المتزامنة؛ وتتعارض الأجسام المختلفة. تعيد الإعادات الناجحة الأعداد الأصلية ولا تلغي عمليات الدخول الأحدث. تنجح الحسابات/sid غير المعروفة بصفر صفوف متأثرة وتحتفظ بعلامة رفض الدخول. يسجل نطاق الحساب حدًا زمنيًا للمصادقة عند قبول الخادم. تبقى صلاحية استحقاق الشراء وشروط الترخيص. تقبل الاتصالات المعطلة الإلغاءات.",
        "operationId": "launch_post__api_v1_launch_connections_id_session_revocations",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "account_ref": "account_456",
                "event_id": "11111111-1111-4111-8111-111111111111",
                "reason": "forced_logout",
                "scope": "session",
                "sid": "login_123"
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchSessionRevocationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_ref": "account_456",
                    "completed_at": "2026-10-24T05:00:00.145678Z",
                    "connection_id": "11111111-1111-4111-8111-111111111111",
                    "created_at": "2026-10-24T05:00:00.123456Z",
                    "environment": "live",
                    "event_id": "11111111-1111-4111-8111-111111111111",
                    "reason": "forced_logout",
                    "released_devices": 2,
                    "revoked_credentials": 2,
                    "revoked_sessions": 2,
                    "scope": "session",
                    "sid": "login_123",
                    "status": "succeeded"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchSessionRevocation",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "404": {
            "description": "الاتصال غير موجود في هذا المستأجر"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "415": {
            "description": "استخدم Content-Type: application/json"
          },
          "500": {
            "description": "فشل قاعدة البيانات أو نتيجة مجهولة؛ استعلم عن الحدث الأصلي أو أعد محاولته دون تغيير معرّفه أو جسمه"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "إلغاء دخول Launch أو جميع جلسات ترخيص الحساب",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/connections/{id}/session-revocations/{event}": {
      "get": {
        "description": "يعيد الإيصال الدائم الأصلي لهذا المستأجر والاتصال. يعني HTTP 404 عدم ظهور نتيجة معتمدة حاليًا؛ أعد محاولة POST الأصلي باستخدام event_id والجسم نفسيهما. لا يلزم عامل غير متزامن.",
        "operationId": "launch_get__api_v1_launch_connections_id_session_revocations_event_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_ref": "account_456",
                    "completed_at": "2026-10-24T05:00:00.145678Z",
                    "connection_id": "11111111-1111-4111-8111-111111111111",
                    "created_at": "2026-10-24T05:00:00.123456Z",
                    "environment": "live",
                    "event_id": "11111111-1111-4111-8111-111111111111",
                    "reason": "forced_logout",
                    "released_devices": 2,
                    "revoked_credentials": 2,
                    "revoked_sessions": 2,
                    "scope": "session",
                    "sid": "login_123",
                    "status": "succeeded"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchSessionRevocation",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "404": {
            "description": "لا توجد نتيجة معتمدة في هذا المستأجر والاتصال"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "500": {
            "description": "فشل قاعدة البيانات أو نتيجة مجهولة؛ استعلم عن الحدث الأصلي أو أعد محاولته دون تغيير معرّفه أو جسمه"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "الاستعلام عن نتيجة إلغاء جلسة Launch معتمدة",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/launch/device-operations/{operation}": {
      "get": {
        "description": "قراءة تقدم التحرير عن بُعد. يتولى Licentivo القرارات وإعادة المحاولة وفحوص النطاق.",
        "operationId": "launch_get__api_v1_launch_device_operations_operation_",
        "parameters": [
          {
            "in": "path",
            "name": "operation",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "activation_id": "11111111-1111-4111-8111-111111111111",
                    "expected_generation": 1,
                    "license_id": "11111111-1111-4111-8111-111111111111",
                    "operation_id": "11111111-1111-4111-8111-111111111111",
                    "source": "logout",
                    "status": "pending"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeviceReleaseOperation",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "قراءة تقدم التحرير عن بُعد",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/launch/device-operations/{operation}/retry": {
      "post": {
        "description": "تتطلب عملية manual_review القيمة approve=true من المالك. لا تتجاوز الموافقة إصدار الربط الأصلي مطلقًا.",
        "operationId": "launch_post__api_v1_launch_device_operations_operation_retry",
        "parameters": [
          {
            "in": "path",
            "name": "operation",
            "required": true,
            "schema": {
              "description": "UUID مورد Licentivo.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "approve": {
                    "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
                    "type": "boolean"
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {},
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "description": "نتيجة هذه العملية.",
                      "properties": {
                        "queued": {
                          "description": "ما إذا كان اتصال الثقة هذا يستطيع التصريح باستخدام تشغيل جديد.",
                          "type": "boolean"
                        }
                      },
                      "required": [],
                      "type": "object"
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [
          {
            "managementKey": []
          },
          {
            "session": []
          }
        ],
        "summary": "إعادة محاولة تحرير تمت مراجعته أو الموافقة عليه صراحة",
        "tags": [
          "Launch account licensing"
        ],
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/launch/exchange": {
      "post": {
        "description": "Idempotency-Key إلزامي. يلزم في ترويسة JWT القيم alg=Ed25519 وtyp=licentivo-launch-identity+jwt وkid المثبت؛ ويلزم تطابق iss/aud/environment وsub وsid وjti وiat وnbf وexp وauth_time وsession_exp وlaunch_product_id وproduct_id وentitlement_ref. أقصى عمر للتأكيد 120 ثانية. لا تستعيد الإعادات إلا جلسة الجهاز النشطة نفسها بالطلب ومفتاح عدم التكرار نفسيهما. تُقرأ المشتريات حصريًا من Licentivo.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "description": "Idempotency-Key لعملية ترخيص Launch هذه.",
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "environment": "live",
                "identity_token": "identity_token_example",
                "launch_connection_id": "11111111-1111-4111-8111-111111111111",
                "product_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/LaunchExchangeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "activation_id": "11111111-1111-4111-8111-111111111111"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RuntimeResult",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [],
        "summary": "تبادل هوية حساب Launch للحصول على ترخيص الجهاز",
        "tags": [
          "Launch account licensing"
        ]
      }
    },
    "/api/v1/legal/policy": {
      "get": {
        "description": "يعيد مستندات الخدمة والاسترداد والخصوصية المجمدة بجميع اللغات 13 المدعومة. تُحذف تفاصيل الملف الاختيارية غير المؤكدة. يتطلب الإصدار المنشور موافقة صريحة؛ وتستمر العمليات الحالية حتى النشر الأول.",
        "operationId": "get__api_v1_legal_policy",
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommercePolicy"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "قراءة سياسة قانونية غير قابلة للتغيير"
      }
    },
    "/api/v1/licenses": {
      "get": {
        "operationId": "get_api_v1_licenses",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "product_id",
            "schema": {
              "description": "UUID المنتج في مساحة العمل الحالية.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "description": "نص البحث؛ تعتمد الحقول المستهدفة والحد الأقصى للطول على العملية.",
              "maxLength": 254,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
              "enum": [
                "active",
                "expired",
                "suspended",
                "revoked"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "customer": "Order #1001",
                        "duration_days": 30,
                        "expires_at": null,
                        "features": [
                          "export"
                        ],
                        "first_activated_at": null,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "key_prefix": "lv_lic_AAAAAAA",
                        "max_devices": 1,
                        "mode": "timed",
                        "policy_id": "22222222-2222-4222-8222-222222222222",
                        "policy_version": 1,
                        "product_id": "11111111-1111-4111-8111-111111111111",
                        "status": "active",
                        "updated_at": "2026-10-18T00:00:00Z"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة التراخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": "يتطلب جلسة Owner أو مفتاح كتابة من Owner نشط. لا توجد إعادة محاولة تلقائية لـ Idempotency-Key.",
        "operationId": "post_api_v1_licenses",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "customer": "Order #1001",
                "customer_email": "buyer@example.com",
                "duration_days": 30,
                "policy_id": "22222222-2222-4222-8222-222222222222",
                "product_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/LicenseCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "duration_days": 30,
                    "expires_at": null,
                    "first_activated_at": null,
                    "id": "33333333-3333-4333-8333-333333333333",
                    "key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "key_prefix": "lv_lic_AAAAAAA"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseSecret",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إصدار ترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-request-variants": [
          {
            "name": "timed",
            "request": {
              "customer": "Order #1001",
              "customer_email": "buyer@example.com",
              "duration_days": 30,
              "policy_id": "22222222-2222-4222-8222-222222222222",
              "product_id": "11111111-1111-4111-8111-111111111111"
            },
            "response": {
              "data": {
                "duration_days": 30,
                "expires_at": null,
                "first_activated_at": null,
                "id": "33333333-3333-4333-8333-333333333333",
                "key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "key_prefix": "lv_lic_AAAAAAA"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "perpetual",
            "request": {
              "customer": "Order #1001",
              "customer_email": "buyer@example.com",
              "duration_days": null,
              "policy_id": "22222222-2222-4222-8222-222222222223",
              "product_id": "11111111-1111-4111-8111-111111111111"
            },
            "response": {
              "data": {
                "duration_days": null,
                "expires_at": null,
                "first_activated_at": null,
                "id": "33333333-3333-4333-8333-333333333333",
                "key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "key_prefix": "lv_lic_AAAAAAA"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          }
        ],
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/batch": {
      "post": {
        "description": "لا يغيّر تطبيق السياسة وضع الترخيص أو عمره مطلقًا. يتطلب الإنشاء مدة صريحة لكل ترخيص timed/trial من إدخاله أو حقل الدفعة المشترك. ترفض التراخيص التي يديرها Launch التجديد المستقل المفرد أو الجماعي مع HTTP 409 LAUNCH_VALIDITY_MANAGED؛ جدّد الشراء في Launch وزامن الصلاحية المطلقة. تتراجع دفعة التجديد المختلطة بالكامل.",
        "operationId": "post_api_v1_licenses_batch",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "duration_days": 30,
                "entries": [
                  {
                    "customer": "Order #1001",
                    "customer_email": "buyer@example.com"
                  }
                ],
                "operation": "create",
                "policy_id": "22222222-2222-4222-8222-222222222222",
                "product_id": "11111111-1111-4111-8111-111111111111",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "schema": {
                "$ref": "#/components/schemas/BatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "count": 1,
                    "items": [
                      {
                        "customer": "Order #1001",
                        "customer_email": "buyer@example.com",
                        "duration_days": 30,
                        "expires_at": null,
                        "first_activated_at": null,
                        "id": "33333333-3333-4333-8333-333333333333",
                        "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                      }
                    ],
                    "operation": "create",
                    "request_id": "55555555-5555-4555-8555-555555555555"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BatchResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "عمليات التراخيص الجماعية",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-request-variants": [
          {
            "name": "create",
            "request": {
              "duration_days": 30,
              "entries": [
                {
                  "customer": "Order #1001",
                  "customer_email": "buyer@example.com"
                }
              ],
              "operation": "create",
              "policy_id": "22222222-2222-4222-8222-222222222222",
              "product_id": "11111111-1111-4111-8111-111111111111",
              "request_id": "55555555-5555-4555-8555-555555555555"
            },
            "response": {
              "data": {
                "count": 1,
                "items": [
                  {
                    "customer": "Order #1001",
                    "customer_email": "buyer@example.com",
                    "duration_days": 30,
                    "expires_at": null,
                    "first_activated_at": null,
                    "id": "33333333-3333-4333-8333-333333333333",
                    "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                  }
                ],
                "operation": "create",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "renew",
            "request": {
              "days": 30,
              "ids": [
                "33333333-3333-4333-8333-333333333333"
              ],
              "operation": "renew",
              "request_id": "55555555-5555-4555-8555-555555555555"
            },
            "response": {
              "data": {
                "count": 1,
                "items": [
                  {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "operation": "renew"
                  }
                ],
                "operation": "renew",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "revoke",
            "request": {
              "ids": [
                "33333333-3333-4333-8333-333333333333"
              ],
              "operation": "revoke",
              "request_id": "55555555-5555-4555-8555-555555555555"
            },
            "response": {
              "data": {
                "count": 1,
                "items": [
                  {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "operation": "revoke"
                  }
                ],
                "operation": "revoke",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "apply_policy",
            "request": {
              "ids": [
                "33333333-3333-4333-8333-333333333333"
              ],
              "operation": "apply_policy",
              "policy_id": "22222222-2222-4222-8222-222222222222",
              "preview_token": "REPLACE_WITH_THE_UNEXPIRED_PREVIEW_TOKEN",
              "request_id": "55555555-5555-4555-8555-555555555555"
            },
            "response": {
              "data": {
                "count": 1,
                "items": [
                  {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "operation": "apply_policy"
                  }
                ],
                "operation": "apply_policy",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          }
        ],
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/export.csv": {
      "get": {
        "operationId": "get_api_v1_licenses_export_csv",
        "parameters": [
          {
            "in": "query",
            "name": "product_id",
            "schema": {
              "description": "UUID المنتج في مساحة العمل الحالية.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "description": "نص البحث؛ تعتمد الحقول المستهدفة والحد الأقصى للطول على العملية.",
              "maxLength": 254,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "حالة المورد الحالية؛ راجع التعداد وملاحظات العملية.",
              "enum": [
                "active",
                "expired",
                "suspended",
                "revoked"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "example": "id,product_id,key_prefix,customer,mode,status,max_devices,expires_at\n",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "413": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "EXPORT_TOO_LARGE",
                    "message": "Filter the export to at most 5000 records"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "تصفية حتى 5000 سجل"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تصدير التراخيص",
        "x-csv-columns": [
          "id",
          "product_id",
          "key_prefix",
          "customer",
          "mode",
          "status",
          "max_devices",
          "expires_at"
        ],
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/licenses/policy-preview": {
      "post": {
        "description": "لا يغيّر تطبيق السياسة وضع الترخيص أو عمره مطلقًا. يتطلب الإنشاء مدة صريحة لكل ترخيص timed/trial من إدخاله أو حقل الدفعة المشترك.",
        "operationId": "post_api_v1_licenses_policy-preview",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ids": [
                  "33333333-3333-4333-8333-333333333333"
                ],
                "policy_id": "22222222-2222-4222-8222-222222222222"
              },
              "schema": {
                "$ref": "#/components/schemas/PreviewInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "changes": [],
                    "expires_in": 600,
                    "note": "",
                    "policy_version": 1,
                    "preview_token": ""
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PolicyPreview",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "معاينة تطبيق السياسة",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/{id}": {
      "delete": {
        "operationId": "delete_api_v1_licenses_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "أرشفة الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      },
      "get": {
        "operationId": "get_api_v1_licenses_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-18T00:00:00Z",
                    "customer": "Order #1001",
                    "duration_days": 30,
                    "expires_at": null,
                    "features": [
                      "export"
                    ],
                    "first_activated_at": null,
                    "id": "33333333-3333-4333-8333-333333333333",
                    "key_prefix": "lv_lic_AAAAAAA",
                    "max_devices": 1,
                    "mode": "timed",
                    "policy_id": "22222222-2222-4222-8222-222222222222",
                    "policy_version": 1,
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "status": "active",
                    "updated_at": "2026-10-18T00:00:00Z"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/License",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "operationId": "patch_api_v1_licenses_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "status": "suspended"
              },
              "schema": {
                "$ref": "#/components/schemas/LicenseUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تحديث الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/{id}/capabilities": {
      "get": {
        "operationId": "get_api_v1_licenses_by_id_capabilities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "customer_email": "buyer@example.com",
                    "license": {
                      "license_id": "33333333-3333-4333-8333-333333333333",
                      "license_model": "node_locked",
                      "maintenance_days": 0,
                      "maintenance_until": null,
                      "max_version": "",
                      "min_version": "",
                      "product_id": "11111111-1111-4111-8111-111111111111",
                      "updated_at": "2026-10-18T00:00:00Z"
                    },
                    "meter_rules": [],
                    "usage": null
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseCapabilityResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة قدرات الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/licenses/{id}/customer": {
      "patch": {
        "operationId": "patch_api_v1_licenses_by_id_customer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "email": "buyer@example.com",
                "name": "Sample customer"
              },
              "schema": {
                "$ref": "#/components/schemas/CustomerAssignment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تعيين العميل",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/{id}/maintenance/renew": {
      "post": {
        "operationId": "post_api_v1_licenses_by_id_maintenance_renew",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "days": 30
              },
              "schema": {
                "$ref": "#/components/schemas/Renew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "license_id": "33333333-3333-4333-8333-333333333333",
                    "license_model": "node_locked",
                    "maintenance_days": 0,
                    "maintenance_until": null,
                    "max_version": "",
                    "min_version": "",
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "updated_at": "2026-10-18T00:00:00Z"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseCapabilities",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تجديد الصيانة",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/{id}/renew": {
      "post": {
        "description": "قبل التفعيل الأول يزيد التجديد duration_days. بعد التفعيل يبدأ الامتداد من الأحدث بين الوقت الحالي وexpires_at؛ ولا تفقد التراخيص المنتهية مدة الامتداد المدفوعة. ترفض التراخيص التي يديرها Launch التجديد المستقل المفرد أو الجماعي مع HTTP 409 LAUNCH_VALIDITY_MANAGED؛ جدّد الشراء في Launch وزامن الصلاحية المطلقة. تتراجع دفعة التجديد المختلطة بالكامل.",
        "operationId": "post_api_v1_licenses_by_id_renew",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "days": 30
              },
              "schema": {
                "$ref": "#/components/schemas/Renew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "duration_days": 60,
                    "expires_at": null,
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Renewed",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تجديد الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-request-variants": [
          {
            "name": "before_activation",
            "request": {
              "days": 30
            },
            "response": {
              "data": {
                "duration_days": 60,
                "expires_at": null,
                "id": "33333333-3333-4333-8333-333333333333"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "after_activation",
            "request": {
              "days": 30
            },
            "response": {
              "data": {
                "duration_days": 30,
                "expires_at": "2026-12-17T00:00:00Z",
                "id": "33333333-3333-4333-8333-333333333333"
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          }
        ],
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/licenses/{id}/reveal-key": {
      "post": {
        "description": "Requires an active Owner browser session and CSRF token. Management API keys and read-only members are forbidden. Keys are encrypted at rest and each view is audited without recording the secret. Ordinary lists, details and CSV exports contain only the prefix. Older encrypted batch/onboarding receipts are recovered during migration. Older hash-only issuances return LICENSE_KEY_UNAVAILABLE (409); Launch account licenses return LICENSE_KEY_NOT_APPLICABLE (409). Viewing does not rotate the key or change validity, devices or usage.",
        "operationId": "post_api_v1_licenses_by_id_reveal-key",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicenseKeyReveal"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "View the original license key",
        "x-required-role": "owner"
      }
    },
    "/api/v1/licenses/{id}/revoke": {
      "post": {
        "operationId": "post_api_v1_licenses_by_id_revoke",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إلغاء الترخيص",
        "x-management-reference": {
          "group": "licenses"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/members": {
      "get": {
        "operationId": "get_api_v1_members",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MemberList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "get /members",
        "x-required-role": "owner"
      },
      "post": {
        "operationId": "post_api_v1_members",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Invited"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "post /members",
        "x-required-role": "owner"
      }
    },
    "/api/v1/members/{id}": {
      "patch": {
        "operationId": "patch_api_v1_members_by_id",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "patch /members/{id}",
        "x-required-role": "owner"
      }
    },
    "/api/v1/offline/respond": {
      "post": {
        "operationId": "post_api_v1_offline_respond",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "activation_id": "44444444-4444-4444-8444-444444444444",
                "app_version": "1.0.0",
                "created_at": 1792281600,
                "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "device_name": "Office PC",
                "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "operation": "deactivate",
                "product_id": "11111111-1111-4111-8111-111111111111",
                "request_id": "55555555-5555-4555-8555-555555555555",
                "version": 1
              },
              "schema": {
                "$ref": "#/components/schemas/OfflineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "operation": "deactivate",
                    "request_id": "55555555-5555-4555-8555-555555555555",
                    "result": {
                      "activation_id": "44444444-4444-4444-8444-444444444444",
                      "deactivated": true
                    },
                    "version": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OfflineResponse",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إصدار استجابة دون اتصال",
        "x-management-reference": {
          "group": "integration"
        },
        "x-request-variants": [
          {
            "name": "activate",
            "request": {
              "app_version": "1.0.0",
              "created_at": 1792281600,
              "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "device_name": "Office PC",
              "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
              "operation": "activate",
              "product_id": "11111111-1111-4111-8111-111111111111",
              "request_id": "55555555-5555-4555-8555-555555555555",
              "version": 1
            },
            "response": {
              "data": {
                "operation": "activate",
                "request_id": "55555555-5555-4555-8555-555555555555",
                "result": {
                  "activation_id": "44444444-4444-4444-8444-444444444444",
                  "device_key": "lv_dev_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                  "heartbeat_seconds": 600,
                  "lease": {
                    "key_id": "66666666-6666-4666-8666-666666666666",
                    "payload": "BASE64URL_ENCODED_SIGNED_CLAIMS",
                    "signature": "BASE64URL_ED25519_SIGNATURE",
                    "version": 1
                  }
                },
                "version": 1
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          },
          {
            "name": "deactivate",
            "request": {
              "activation_id": "44444444-4444-4444-8444-444444444444",
              "app_version": "1.0.0",
              "created_at": 1792281600,
              "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "device_name": "Office PC",
              "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
              "operation": "deactivate",
              "product_id": "11111111-1111-4111-8111-111111111111",
              "request_id": "55555555-5555-4555-8555-555555555555",
              "version": 1
            },
            "response": {
              "data": {
                "operation": "deactivate",
                "request_id": "55555555-5555-4555-8555-555555555555",
                "result": {
                  "activation_id": "44444444-4444-4444-8444-444444444444",
                  "deactivated": true
                },
                "version": 1
              },
              "request_id": "55555555-5555-4555-8555-555555555555"
            }
          }
        ],
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/onboarding": {
      "post": {
        "operationId": "post_api_v1_onboarding",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "duration_days": 7,
                "mode": "trial",
                "name": "Report app",
                "request_id": "55555555-5555-4555-8555-555555555555"
              },
              "schema": {
                "$ref": "#/components/schemas/OnboardingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "config": {
                      "allow_http": false,
                      "app_version": "1.0.0",
                      "base_url": "https://license.example.com",
                      "cache_path": "",
                      "device_name": "My application",
                      "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                      "product_id": "11111111-1111-4111-8111-111111111111",
                      "trusted_keys": {
                        "66666666-6666-4666-8666-666666666666": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                      }
                    },
                    "license_id": "33333333-3333-4333-8333-333333333333",
                    "license_key": "lv_lic_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "next": "Choose a language and download the configured SDK bundle.",
                    "policy_id": "22222222-2222-4222-8222-222222222222",
                    "product_id": "11111111-1111-4111-8111-111111111111"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OnboardingResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إنشاء موارد التكامل",
        "x-management-reference": {
          "group": "integration"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/payments/paddle/webhook": {
      "post": {
        "operationId": "post__api_v1_payments_paddle_webhook",
        "parameters": [
          {
            "in": "header",
            "name": "Paddle-Signature",
            "required": true,
            "schema": {
              "description": "اسم عرض خدمة الدفع.",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaddleWebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReceived"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "التحقق من توقيع Paddle وتسوية المدفوعات أو التعديلات المكتملة",
        "x-licentivo-access": "public"
      }
    },
    "/api/v1/payments/paypal/webhook": {
      "post": {
        "operationId": "post_api_v1_payments_paypal_webhook",
        "parameters": [
          {
            "in": "header",
            "name": "Paypal-Auth-Algo",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Paypal-Cert-Url",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Paypal-Transmission-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Paypal-Transmission-Sig",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Paypal-Transmission-Time",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReceived"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "إشعار تحصيل/استرداد/عكس متحقق منه"
      }
    },
    "/api/v1/payments/waffo/webhook": {
      "post": {
        "operationId": "post__api_v1_payments_waffo_webhook",
        "parameters": [
          {
            "in": "header",
            "name": "X-Waffo-Signature",
            "required": true,
            "schema": {
              "description": "معرّف التاجر الذي يبدأ بـ MER_.",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaffoWebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReceived"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "التحقق من توقيع Waffo وتسوية الدفع أو الاسترداد",
        "x-licentivo-access": "public"
      }
    },
    "/api/v1/policies": {
      "get": {
        "operationId": "get_api_v1_policies",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "product_id",
            "schema": {
              "description": "UUID المنتج في مساحة العمل الحالية.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "features": [
                          "export"
                        ],
                        "heartbeat_seconds": 600,
                        "id": "22222222-2222-4222-8222-222222222222",
                        "max_devices": 1,
                        "mode": "timed",
                        "name": "One device",
                        "offline_mode": "limited",
                        "offline_seconds": 86400,
                        "product_id": "11111111-1111-4111-8111-111111111111",
                        "updated_at": "2026-10-18T00:00:00Z",
                        "version": 1
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PolicyList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة السياسات",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": "يتطلب جلسة Owner أو مفتاح كتابة من Owner نشط. لا توجد إعادة محاولة تلقائية لـ Idempotency-Key.",
        "operationId": "post_api_v1_policies",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "features": [
                  "export"
                ],
                "heartbeat_seconds": 600,
                "max_devices": 1,
                "mode": "timed",
                "name": "One device",
                "offline_mode": "limited",
                "offline_seconds": 86400,
                "product_id": "11111111-1111-4111-8111-111111111111"
              },
              "schema": {
                "$ref": "#/components/schemas/PolicyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إنشاء سياسة",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/policies/{id}": {
      "delete": {
        "operationId": "delete_api_v1_policies_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "أرشفة السياسة",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      },
      "get": {
        "operationId": "get_api_v1_policies_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-18T00:00:00Z",
                    "features": [
                      "export"
                    ],
                    "heartbeat_seconds": 600,
                    "id": "22222222-2222-4222-8222-222222222222",
                    "max_devices": 1,
                    "mode": "timed",
                    "name": "One device",
                    "offline_mode": "limited",
                    "offline_seconds": 86400,
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "updated_at": "2026-10-18T00:00:00Z",
                    "version": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Policy",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة السياسة",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "description": "تحديث السياسة وكل لقطة ترخيص مرتبطة غير ملغاة بصورة ذرية. تُحفظ شروط التراخيص الحالية والاستخدام المعتمد وامتدادات الصيانة المنفصلة. يعيد synced_licenses. يؤدي ACTIVE_DEVICES_CONFLICT إلى التراجع عن الحفظ كله.",
        "operationId": "patch_api_v1_policies_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "max_devices": 2
              },
              "schema": {
                "$ref": "#/components/schemas/PolicyUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "synced_licenses": 0
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PolicySyncResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تحديث السياسة الأساسية",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/policies/{id}/capabilities": {
      "get": {
        "operationId": "get_api_v1_policies_by_id_capabilities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "allow_vm": true,
                    "device_match": "system",
                    "license_model": "node_locked",
                    "maintenance_days": 0,
                    "max_version": "",
                    "meter_rules": [],
                    "min_version": "",
                    "policy_id": "22222222-2222-4222-8222-222222222222",
                    "policy_version": 1,
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "require_hardware": false,
                    "self_release_limit": 3,
                    "session_seconds": 7200,
                    "updated_at": "2026-10-18T00:00:00Z"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PolicyCapabilities",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة قدرات السياسة",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "description": "استخدم policy_version الحالي. حدّث السياسة وكل لقطة ترخيص مرتبطة غير ملغاة ذريًا مع الحفاظ على الشروط الصادرة والاستخدام المعتمد وامتدادات الصيانة المنفصلة. يعيد synced_licenses. يؤدي POLICY_CHANGED أو ACTIVE_DEVICES_CONFLICT إلى التراجع عن الحفظ كله.",
        "operationId": "patch_api_v1_policies_by_id_capabilities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "license_model": "node_locked",
                "meter_rules": [
                  {
                    "allow_overage": false,
                    "feature": "export",
                    "limit": 500,
                    "max_overage": 0,
                    "period": "month"
                  }
                ],
                "policy_version": 1
              },
              "schema": {
                "$ref": "#/components/schemas/PolicyCapabilitiesInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "synced_licenses": 0
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PolicySyncResult",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تحديث قدرات السياسة",
        "x-management-reference": {
          "group": "policies"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/products": {
      "get": {
        "operationId": "get_api_v1_products",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "description": "نص البحث؛ تعتمد الحقول المستهدفة والحد الأقصى للطول على العملية.",
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "description": "Desktop reporting software",
                        "id": "11111111-1111-4111-8111-111111111111",
                        "name": "Report app",
                        "status": "active",
                        "updated_at": "2026-10-18T00:00:00Z"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProductList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة المنتجات",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-scope": "read"
      },
      "post": {
        "description": "يتطلب جلسة Owner أو مفتاح كتابة من Owner نشط. لا توجد إعادة محاولة تلقائية لـ Idempotency-Key.",
        "operationId": "post_api_v1_products",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": "Desktop reporting software",
                "name": "Report app"
              },
              "schema": {
                "$ref": "#/components/schemas/ProductCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إنشاء منتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/products/{id}": {
      "delete": {
        "operationId": "delete_api_v1_products_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "أرشفة المنتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      },
      "get": {
        "operationId": "get_api_v1_products_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-18T00:00:00Z",
                    "description": "Desktop reporting software",
                    "id": "11111111-1111-4111-8111-111111111111",
                    "name": "Report app",
                    "status": "active",
                    "updated_at": "2026-10-18T00:00:00Z"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Product",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قراءة المنتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-scope": "read"
      },
      "patch": {
        "operationId": "patch_api_v1_products_by_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "name": "Report app Pro",
                "status": "active"
              },
              "schema": {
                "$ref": "#/components/schemas/ProductUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تحديث المنتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/products/{id}/public-keys": {
      "get": {
        "operationId": "get_api_v1_products_by_id_public-keys",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeyBundle"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "حزمة المفاتيح المثبتة للمنتج"
      }
    },
    "/api/v1/products/{id}/releases": {
      "get": {
        "operationId": "get_api_v1_products_by_id_releases",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "channel": "stable",
                        "created_at": "2026-10-18T00:00:00Z",
                        "download_url": "",
                        "id": "33333333-3333-4333-8333-333333333333",
                        "notes": "Initial release",
                        "product_id": "11111111-1111-4111-8111-111111111111",
                        "published_at": "2026-10-18T00:00:00Z",
                        "sha256": "",
                        "version": "1.0.0"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReleaseList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة الإصدارات",
        "x-management-reference": {
          "group": "releases"
        },
        "x-required-scope": "read"
      },
      "post": {
        "operationId": "post_api_v1_products_by_id_releases",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "channel": "stable",
                "notes": "Initial release",
                "version": "1.0.0"
              },
              "schema": {
                "$ref": "#/components/schemas/ReleaseInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "channel": "stable",
                    "created_at": "2026-10-18T00:00:00Z",
                    "download_url": "",
                    "id": "33333333-3333-4333-8333-333333333333",
                    "notes": "Initial release",
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "published_at": "2026-10-18T00:00:00Z",
                    "sha256": "",
                    "version": "1.0.0"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Release",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "نشر إصدار",
        "x-management-reference": {
          "group": "releases"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/products/{id}/sdk-bundle": {
      "post": {
        "operationId": "post_api_v1_products_by_id_sdk-bundle",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "language": "go"
              },
              "schema": {
                "$ref": "#/components/schemas/BundleInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تنزيل الشيفرة المصدرية لمثال المنتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/products/{id}/sdk-initializer": {
      "get": {
        "operationId": "get_api_v1_products_by_id_sdk-initializer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "language",
            "schema": {
              "default": "go",
              "description": "معرّف لغة SDK لحزمة التنزيل.",
              "enum": [
                "go",
                "java",
                "c",
                "cpp",
                "csharp",
                "python",
                "javascript",
                "rust",
                "ruby"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "language": "go",
                    "product_id": "11111111-1111-4111-8111-111111111111",
                    "source": "const productID = \"11111111-1111-4111-8111-111111111111\"\nvar trustedKeys = map[string]string{\"66666666-6666-4666-8666-666666666666\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}\n",
                    "trusted_keys": {
                      "66666666-6666-4666-8666-666666666666": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                    }
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SDKInitializer",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "نسخ رمز تهيئة المنتج",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/products/{id}/signing-keys": {
      "get": {
        "operationId": "get_api_v1_products_by_id_signing-keys",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "keys": [],
                    "product_id": "11111111-1111-4111-8111-111111111111"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ManagementKeyBundle",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة مفاتيح التوقيع",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/products/{id}/signing-keys/rotate": {
      "post": {
        "operationId": "post_api_v1_products_by_id_signing-keys_rotate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "active": true,
                    "algorithm": "Ed25519",
                    "created_at": "2026-10-18T00:00:00Z",
                    "key_id": "66666666-6666-4666-8666-666666666666",
                    "public_key": "",
                    "retired_at": null
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SigningKey",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تدوير مفتاح التوقيع",
        "x-management-reference": {
          "group": "products"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/releases/eligible": {
      "post": {
        "description": "عملية تشغيل مصادق عليها بالترخيص؛ دون cookie للمورّد أو API Key. يتطلب استهلاك الميزة Idempotency-Key ثابتًا؛ ولا يخصم consume من API المنصة.",
        "operationId": "post_api_v1_releases_eligible",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EligibleReleases"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "/releases/eligible"
      }
    },
    "/api/v1/service/status": {
      "get": {
        "description": "الإشعارات العامة وحدها علنية؛ ولا تُكشف معرّفات مساحات العمل المستهدفة.",
        "operationId": "get__api_v1_service_status",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceIncidentList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "قراءة الصيانة والحوادث العامة"
      }
    },
    "/api/v1/sessions/logout": {
      "post": {
        "description": "دون ملفات cookie للمتصفح أو رمز CSRF. تُعاد العملية المكررة دون تحرير روابط أحدث. تعني الحالة stale اكتمال إلغاء قديم بنجاح. تمنع حزم SDK الاستخدام المحلي وتمسح بيانات تشغيل الاعتماد قبل إرسال هذا الطلب.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "activation_id": "11111111-1111-4111-8111-111111111111",
                "expected_generation": 1,
                "operation_id": "11111111-1111-4111-8111-111111111111",
                "product_id": "11111111-1111-4111-8111-111111111111",
                "release_token": "lv_out_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
              },
              "schema": {
                "$ref": "#/components/schemas/LogoutTicket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "activation_id": "11111111-1111-4111-8111-111111111111",
                    "expected_generation": 1,
                    "license_id": "11111111-1111-4111-8111-111111111111",
                    "operation_id": "11111111-1111-4111-8111-111111111111",
                    "source": "logout",
                    "status": "pending"
                  },
                  "request_id": "request_id_example"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeviceReleaseOperation",
                      "description": "نتيجة هذه العملية."
                    },
                    "request_id": {
                      "description": "معرّف ارتباط طلب HTTP.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "النتيجة المقبولة"
          },
          "400": {
            "description": "مدخل غير صالح"
          },
          "401": {
            "description": "رُفضت المصادقة أو تأكيد الهوية"
          },
          "403": {
            "description": "أُلغي الاستحقاق أو بيانات الاعتماد أو البيئة أو تسجيل الدخول"
          },
          "409": {
            "description": "تعارض إصدار عدم التكرار أو السياسة أو المراجعة أو الربط"
          },
          "503": {
            "description": "فشل مؤقت؛ أعد محاولة العملية الأصلية"
          }
        },
        "security": [],
        "summary": "إلغاء ربط جهاز ذي إصدار باستخدام تذكرة خاصة بفك الربط",
        "tags": [
          "Launch account licensing"
        ]
      }
    },
    "/api/v1/summary": {
      "get": {
        "operationId": "get_api_v1_summary",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "active_licenses": 0,
                    "licenses": 0,
                    "policies": 0,
                    "products": 0
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Summary",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "أعداد مساحة العمل",
        "x-management-reference": {
          "group": "usage"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/support/contact": {
      "get": {
        "description": "يعيد بريد الاتصال المهيأ فقط؛ وتعني القيمة الفارغة أنه مخفي. لا يُرسل بريد.",
        "operationId": "get__api_v1_support_contact",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportContact"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [],
        "summary": "قراءة بريد الدعم العام"
      }
    },
    "/api/v1/system/billing-notifications": {
      "get": {
        "description": "يعيد استخدام نقل بريد المصادقة والمرسل والطابور الدائم المشفر وإعادة المحاولة. يجب أن يسمح كل من إذن المنصة وموافقة المستلم بالنوع. يعيد التسليم فحص الموافقة الحالية وحالة الحدث. لا تمنح خيارات البريد موافقة على خصم المحفظة ولا تلغيها. تُوسم رسائل Sandbox. لا تُنشأ إشعارات للمشتريات المعلقة غير المدفوعة أو الهدايا.",
        "operationId": "get__api_v1_system_billing_notifications",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingNotificationSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة قواعد بريد فوترة المنصة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "patch": {
        "description": "تحديث جزئي؛ تُحفظ قيم false الصريحة. يعيد استخدام نقل بريد المصادقة والمرسل والطابور الدائم المشفر وإعادة المحاولة. يجب أن يسمح كل من إذن المنصة وموافقة المستلم بالنوع. يعيد التسليم فحص الموافقة الحالية وحالة الحدث. لا تمنح خيارات البريد موافقة على خصم المحفظة ولا تلغيها. تُوسم رسائل Sandbox. لا تُنشأ إشعارات للمشتريات المعلقة غير المدفوعة أو الهدايا.",
        "operationId": "patch__api_v1_system_billing_notifications",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingNotificationSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingNotificationSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إعداد قواعد بريد الفوترة وجهة الدعم العامة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/billing-notifications/preview": {
      "get": {
        "description": "يستخدم إعدادات المنصة المحفوظة وبيانات sandbox نموذجية. لا ينشئ عملية شراء أو مهمة بريد.",
        "operationId": "get__api_v1_system_billing_notifications_preview",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "purchase_success",
                "expiry_reminder",
                "auto_renewal_success",
                "auto_renewal_problem"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "schema": {
              "default": "zh",
              "enum": [
                "zh",
                "zh-hant",
                "en",
                "es",
                "hi",
                "ar",
                "fr",
                "bn",
                "pt",
                "id",
                "ur"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingEmailPreview"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معاينة بريد فوترة دون إرسال",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/billing-notifications/test": {
      "post": {
        "description": "يستخدم الاختبار الصريح بيانات sandbox نموذجية، ويضيف [TEST]، ويتبع إعداد البريد الحالي. يمكنه اختبار قالب حتى إذا كان نوع إشعار العميل معطلًا. لا يتم دفع أو تجديد.",
        "operationId": "post__api_v1_system_billing_notifications_test",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingEmailTestInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailQueued"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إدراج اختبار بريد فوترة مطلوب في الطابور",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/check-mail": {
      "post": {
        "description": "فحص الخدمة المحفوظة فقط. تستخدم فحوص موفّر API طلبات قراءة فقط ولا ترسل بريدًا مطلقًا. قد ينتج مفتاح الإرسال فقط check_status=limited وok=false؛ وهذا لا يؤكد صلاحية بيانات الاعتماد أو نجاح التسليم. يلزم طلب بريد اختبار صريح لاختبار الإرسال.",
        "operationId": "post_api_v1_system_check-mail",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailConnection"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "MAIL_PROVIDER_AUTH_FAILED أو MAIL_PROVIDER_RATE_LIMITED أو MAIL_PROVIDER_UNAVAILABLE. تسليم بريد الاختبار غير متزامن؛ وتظهر أخطاء التسليم في نتيجة المهمة بدلًا من استجابة HTTP 202 الأصلية."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "post /system/check-mail",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_system_customer_cases",
        "parameters": [
          {
            "description": "استبعد نوع طلب واحدًا قبل العد والتقسيم إلى صفحات. استخدم refund لإبقاء حالات الاسترداد خارج قائمة الدعم؛ ويظل الوصول مقيدًا بالجلسة الحالية.",
            "in": "query",
            "name": "exclude_kind",
            "schema": {
              "maxLength": 24,
              "type": "string"
            }
          },
          {
            "description": "قصر حالات الاسترداد على شحن المحفظة أو إلغاء الخدمة.",
            "in": "query",
            "name": "refund_scope",
            "required": false,
            "schema": {
              "enum": [
                "wallet",
                "service"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة طلبات العملاء",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/unread": {
      "get": {
        "description": "تُستثنى محادثات الاسترداد. يرى العملاء تذاكر مساحة العمل المصرح بها فقط؛ ويرى الأعضاء تذاكرهم الخاصة. لكل مسؤول علامة قراءة مستقلة.",
        "operationId": "get__api_v1_system_customer_cases_unread",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportUnread"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة أعداد التذاكر الشخصية والإشعارات غير المقروءة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_system_customer_cases__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة الطلب والردود",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/deletion-review": {
      "post": {
        "description": "يتطلب الإقرار بالالتزامات المالية. يلغي الوصول العادي فورًا؛ ويغلق تصدير العميل بعد 30 يومًا بالضبط ويحتفظ بجميع سجلات الأعمال لتصدير المسؤول المصرح له.",
        "operationId": "post__api_v1_system_customer_cases__id__deletion_review",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountClosureReview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد إغلاق الحساب المنطقي أو رفضه",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/manual-refund": {
      "post": {
        "description": "يتطلب موافقة العميل ودليل دفع مكتمل. يسجل هذا التسوية ولا يرسل تحويلًا مصرفيًا مطلقًا. لا يمكن للتأكيد المتكرر الخصم مرتين. ترفض مدفوعات Waffo/Paddle الأصلية، بما فيها الخدمات، مسار التصريح وحده برمز ORIGINAL_REFUND_REQUIRED.",
        "operationId": "post__api_v1_system_customer_cases__id__manual_refund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManualRefundInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تسجيل استرداد بديل اكتمل فعليًا",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/messages": {
      "post": {
        "description": "ترفض حالات الاسترداد الردود برمز REFUND_REVIEW_WORKFLOW؛ ويوافق المسؤولون أو يرفضون مباشرة. تحتفظ تذاكر الدعم العادية بالردود. تحتفظ عمليات الإغلاق المراجعة بحالة سير عمل الخصوصية.",
        "operationId": "post__api_v1_system_customer_cases__id__messages",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportReply"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "الرد على تذكرة دعم",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/read": {
      "post": {
        "description": "تُعلّم الرسائل حتى آخر رسالة معروضة فقط بأنها مقروءة. تبقى الرسائل الأحدث غير مقروءة ولا يمكن للتأكيد المتأخر إرجاع علامة القراءة إلى الخلف.",
        "operationId": "post__api_v1_system_customer_cases__id__read",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportReadInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد رسائل التذاكر المعروضة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/recover-original-refund": {
      "post": {
        "description": "يتطلب تأكيدًا صريحًا من المسؤول بعدم إجراء تحويل بديل فعليًا. يحافظ على الدليل الأصلي ويستخدم قيود دفتر تعويضية. لا يُطلب من المدفوعات الأصلية إلا المبلغ المتبقي.",
        "operationId": "post__api_v1_system_customer_cases__id__recover_original_refund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoverOriginalRefund"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تصحيح تصريح يدوي غير مدفوع وطلب الاسترداد الأصلي",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/refund-quote": {
      "post": {
        "description": "معاينة جديدة للنطاق والمبلغ والجدول. يتطلب تغير نطاق الخدمة طلبًا جديدًا من العميل؛ ويمكن للمسؤول رفض الطلب القديم مباشرة.",
        "operationId": "post__api_v1_system_customer_cases__id__refund_quote",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRefundPreviewInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScopedRefundPreview"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معاينة طلب معلق محدد النطاق قبل الموافقة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/customer/cases/{id}/refund-review": {
      "post": {
        "description": "تُسلسَل العمليات على مساحة العمل المستهدفة. تحجز الموافقة أموال المحفظة المتاحة وتخصص استردادات المسار الأصلي باستخدام معرّفات طلب موفّر ثابتة وتحتفظ بأي رصيد يتطلب بديلًا متفقًا عليه. تنشئ موافقات Waffo/Paddle نوايا استرداد دائمة للموفّر الأصلي وتصدر طلبات API لاسترداد التاجر. لا يمكن لأي تصريح يدوي إكمال هذه الاستردادات. حالة الموافقة processing/pending لا تعني تسوية الأموال.",
        "operationId": "post__api_v1_system_customer_cases__id__refund_review",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundReview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupportCaseDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "الموافقة على استرداد العميل أو رفضه",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/legal/policy": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_system_legal_policy",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommercePolicy"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة ملف المشغّل وإصدارات السياسة المعلقة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "patch": {
        "description": "يتطلب النشر اسمًا قانونيًا مؤكدًا للمشغّل وبريد اتصال صالحًا. تفاصيل الملف الأخرى اختيارية وتُحذف العناصر غير المؤكدة من المستندات العامة. تحافظ البدائل المنشورة على الإصدار السابق خلال إشعار في وحدة التحكم وبريد أُرسل بنجاح لمدة 30 يومًا على الأقل.",
        "operationId": "patch__api_v1_system_legal_policy",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommercePolicyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommercePolicy"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "نشر سياسات الخدمة أو جدولتها",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/mail-jobs": {
      "get": {
        "description": "جلسة platform-admin فقط. أحدث 50 رسالة مع النوع والبيئة والمستلم والمحاولات والحالة وسبب الإلغاء. تُمحى حمولات الرسائل المسلّمة/الملغاة. قبول SMTP لا يعني التسليم إلى صندوق الوارد أو القراءة.",
        "operationId": "get_api_v1_system_mail-jobs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailJobList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "get /system/mail-jobs",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/mail-jobs/{id}/retry": {
      "post": {
        "description": "يعيد ضبط عدد المحاولات ويدرج الرسالة الفاشلة نفسها في الطابور. تعيد المهام المسلّمة والملغاة والجارية والمعلقة MAIL_JOB_NOT_RETRYABLE. تعيد مهام الفوترة فحص الموافقة الحالية وحالة الحدث قبل محاولة التسليم الجديدة. لا تعكس أخطاء SMTP دفعة معتمدة مطلقًا.",
        "operationId": "post__api_v1_system_mail_jobs__id__retry",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailQueued"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إعادة محاولة بريد فاشل بحمولته المشفرة المحفوظة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/operations": {
      "get": {
        "description": "جلسة platform-admin فقط. سجل تطبيق للإضافة فقط مع المنفذ والموضوع والسبب والتغييرات الصريحة.",
        "operationId": "get__api_v1_system_operations",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformOperationList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة عمليات العملاء الإدارية"
      }
    },
    "/api/v1/system/overview": {
      "get": {
        "description": "جلسة platform-admin فقط. تستخدم مقاييس الحزم بيئة الدفع المهيأة حاليًا. يغطي المستخدمون الجدد آخر 30 يومًا؛ ويغطي انتهاء الصلاحية الأيام 7 التالية.",
        "operationId": "get__api_v1_system_overview",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformOverview"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة إجماليات عملاء المنصة والحزم"
      }
    },
    "/api/v1/system/paddle": {
      "get": {
        "operationId": "get__api_v1_system_paddle",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleSettings"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة إعداد Paddle دون مفاتيح خاصة",
        "x-licentivo-access": "platform"
      },
      "patch": {
        "operationId": "patch__api_v1_system_paddle",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaddleSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleSettings"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حفظ بيانات اعتماد Paddle Billing المشفرة",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/paddle/check": {
      "post": {
        "operationId": "post__api_v1_system_paddle_check",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleCheck"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من بيانات اعتماد Paddle والمنتج النشط",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/paddle/orders": {
      "get": {
        "operationId": "get__api_v1_system_paddle_orders",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderList"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة مدفوعات خدمة Paddle وشحن المحفظة",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/paddle/orders/{id}/reconcile": {
      "post": {
        "operationId": "post__api_v1_system_paddle_orders__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaddleReconcileInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaddleOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تسوية معاملة أصلية أو استعادتها دون إنشاء خصم",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/payment-channels": {
      "get": {
        "operationId": "get__api_v1_system_payment_channels",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaymentChannels"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة قنوات الدفع القابلة للإعداد المستقل",
        "x-licentivo-access": "platform"
      },
      "patch": {
        "operationId": "patch__api_v1_system_payment_channels",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentChannelInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaymentChannels"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تفعيل القنوات أو تعطيلها ذريًا باستخدام التحكم التفاؤلي بالتزامن",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/paypal": {
      "get": {
        "operationId": "get_api_v1_system_paypal",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "paypal",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "patch": {
        "operationId": "patch_api_v1_system_paypal",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayPalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "paypal",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/paypal/check": {
      "post": {
        "operationId": "post_api_v1_system_paypal_check",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalCheck"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "paypal/check",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/paypal/orders/{id}/refund": {
      "post": {
        "description": "جلسة platform-admin فقط. تحجز رصيد المحفظة المتاح غير المنفق قبل الاتصال بـ PayPal. تعني Pending أن النتيجة لم تُؤكد؛ سوِّ الطلب نفسه. لا تلغي الحزمة تلقائيًا.",
        "operationId": "post__api_v1_system_paypal_orders__id__refund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalRefund"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "استرداد أموال المحفظة غير المستخدمة إلى وسيلة دفع PayPal الأصلية"
      }
    },
    "/api/v1/system/paypal/refund-requests": {
      "get": {
        "description": "جلسات Cookie فقط؛ لا تُقبل مفاتيح API للإدارة. تقتصر قراءات العميل على مساحة عمله. تتطلب كتابات العميل Owner متحققًا منه لمساحة العمل، دون إذن مسؤول المنصة. لا تنقل الطلبات الأموال ولا تحجزها. تعيد موافقة المسؤول فحص المحفظة الحالية وقيمة التحصيل غير المستردة، ثم تستخدم عملية الاسترداد والحجز الحالية غير المكررة عبر المسار الأصلي. لا تلغي الموافقة الخطط.",
        "operationId": "get__api_v1_system_paypal_refund_requests",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRefundRequestList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة طلبات استرداد العملاء للمراجعة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/paypal/refund-requests/{id}/review": {
      "post": {
        "description": "جلسات Cookie فقط؛ لا تُقبل مفاتيح API للإدارة. تقتصر قراءات العميل على مساحة عمله. تتطلب كتابات العميل Owner متحققًا منه لمساحة العمل، دون إذن مسؤول المنصة. لا تنقل الطلبات الأموال ولا تحجزها. تعيد موافقة المسؤول فحص المحفظة الحالية وقيمة التحصيل غير المستردة، ثم تستخدم عملية الاسترداد والحجز الحالية غير المكررة عبر المسار الأصلي. لا تلغي الموافقة الخطط.",
        "operationId": "post__api_v1_system_paypal_refund_requests__id__review",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletRefundReview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRefundRequest"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو مصادقة أو ملكية أو تعارض مراجعة أو رصيد"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "الموافقة على طلب استرداد العميل أو رفضه",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/paypal/refunds": {
      "get": {
        "description": "جلسة platform-admin فقط.",
        "operationId": "get__api_v1_system_paypal_refunds",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RefundList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة طلبات الاسترداد لبيئة الدفع المحددة"
      }
    },
    "/api/v1/system/paypal/refunds/{id}/reconcile": {
      "post": {
        "description": "جلسة platform-admin فقط. تعيد محاولة PayPal-Request-Id نفسه إذا لم يُستلم معرّف الاسترداد، أو تجلب استرداد الموفّر الموجود.",
        "operationId": "post__api_v1_system_paypal_refunds__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayPalRefund"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تسوية الاسترداد نفسه دون هوية خصم جديدة"
      }
    },
    "/api/v1/system/plan-gifts": {
      "get": {
        "description": "جلسة platform-admin فقط. يمثل المستلم المحدد مساحة العمل بعد إزالة التكرار. يطابق البحث بريد المستلم أو مساحة العمل أو اسم الحزمة.",
        "operationId": "get__api_v1_system_plan_gifts",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "user_id",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanGiftList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة سجل الهدايا"
      },
      "post": {
        "description": "جلسة platform-admin فقط. دفعة ذرية. قدّم fingerprint من المعاينة وrequest_id ثابتًا؛ تعيد الإعادة المطابقة الدفعة نفسها. تتطلب تغييرات المستوى أو الجدول معاينة جديدة. تحتفظ الهدايا بدفع فعلي صفر ولا يمكن أن تتحول إلى استرداد نقدي. تُضاف قيمة منفعتها المحتسبة طبيعيًا عند الترقية. تتبع هدايا المستوى الحالي الجديدة التي لم تبدأ فقط ترقية لاحقة دون دفع إضافي مع الاحتفاظ بتواريخها. لا يعاد ضبط الهدايا التاريخية مطلقًا؛ وتطبق الحصص الشهرية وقواعد الزيادة طبيعيًا. تستخدم الدفعات المختلطة بيانات current/--- الوصفية؛ افحص سجلات الهدايا الفردية المدعومة بالشراء لكل مستوى وعملة فعليين.",
        "operationId": "post__api_v1_system_plan_gifts",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanGiftInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanGiftResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تأكيد هدية المستوى الحالي بعد مراجعتها"
      }
    },
    "/api/v1/system/plan-gifts/preview": {
      "post": {
        "description": "جلسة platform-admin فقط. من 1–100 معرّف مستخدم عميل نشط ومتميز. يحصل مستخدمو مساحة العمل نفسها على عقد واحد. يرث كل عنصر حزمة العميل الفعالة حاليًا أو آخر حزمة منتهية في البيئة المحددة. تعيد الدفعات مختلطة المستويات الخطة الفعلية وقيمة المنفعة لكل عنصر. احذف plan/currency/price_version؛ ويجب أن تطابق القيم الصريحة الاختيارية حزمة كل عميل الحالية. لا يمكن للعملاء دون حزمة تلقي مستوى مختلف عبر هذه الواجهة. يضيف after_current بعد جميع التغطيات المدفوعة/المهداة؛ ويرفض immediate الحقوق المتداخلة. لا توجد كتابة أو رسوم.",
        "operationId": "post__api_v1_system_plan_gifts_preview",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanGiftPreviewInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanGiftPreview"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معاينة هدية حزمة من المستوى الحالي"
      }
    },
    "/api/v1/system/plan-gifts/{id}/cancel": {
      "post": {
        "description": "جلسة platform-admin فقط. الإلغاء المتكرر آمن. يوقف هذا العقد دون حذف السجل أو استرداد رسوم الزيادة أو نقل العقود المجدولة الأخرى.",
        "operationId": "post__api_v1_system_plan_gifts__id__cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformReason"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlanGiftCancellation"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إلغاء هدية نشطة أو مجدولة"
      }
    },
    "/api/v1/system/plans": {
      "get": {
        "operationId": "get_api_v1_system_plans",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminPlanList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "plans",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "post": {
        "operationId": "post_api_v1_system_plans",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Price"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "plans",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/plans/customer-controls": {
      "patch": {
        "description": "جلسة platform-admin فقط. كلا المفتاحين false افتراضيًا. قدّم device_enabled أو api_enabled أو كليهما. تحتفظ المفاتيح المحذوفة بحالتها الحالية. يخفي كل مفتاح معطل عناصر تحكم العميل الخاصة به ويتجاهل تفضيله المحفوظ وحده حتى إعادة تفعيله. تبقى حصص API الموسومة unlimited غير محدودة.",
        "operationId": "patch__api_v1_system_plans_customer_controls",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerControlsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomerControlsResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "السماح مستقلًا بإعدادات زيادة أجهزة العميل أو API"
      }
    },
    "/api/v1/system/plans/default": {
      "patch": {
        "operationId": "patch_api_v1_system_plans_default",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultPlan"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DefaultPlan"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "plans/default",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/privacy/retention": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_system_privacy_retention",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة عمليات الأرشفة والاحتفاظ",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/privacy/retention/run": {
      "post": {
        "description": "أرشفة منطقية فقط؛ تبقى صفوف العملاء/الأعمال. تدوّر ملفات النسخ الاحتياطي المدارة والمصادق عليها .lvb بعد 90 يومًا وسجلات الأمان المملوكة للتطبيق بعد ستة أشهر تقويمية. تُسلسَل العمليات بقفل قاعدة بيانات.",
        "operationId": "post__api_v1_system_privacy_retention_run",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Confirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommerceResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "معالجة الأرشفة والاحتفاظ المستحقين بالفعل",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/provider-refunds/{id}/reconcile": {
      "post": {
        "description": "يستعلم عن الطلب الموجود بمرجع الموفّر/الأعمال. لا يجوز إصدار الطلب الأول إلا لنية دائمة لم تُرسل سابقًا؛ ولا تُرسل الطلبات المكررة أو المجهولة مجددًا. يتطلب الاكتمال إيصالات الموفّر الأصلي المتحقق منها بصورة مستقلة.",
        "operationId": "post__api_v1_system_provider_refunds__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProviderRefund"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تسوية الاسترداد الموجود عبر القناة الأصلية",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/refund-requests": {
      "get": {
        "description": "جلسة مسؤول منصة للقراءة فقط. تجمع طلبات استرداد المحفظة وحالات إلغاء المحفظة/الخدمة لدى الموفّر. أعداد المعلقات حسب البيئة مستقلة عن التقسيم إلى صفحات ومرشحات النطاق. لا توافق القراءة على الأموال أو تجمدها أو تستردها مطلقًا؛ استخدم واجهة المراجعة الحالية لكل مصدر.",
        "operationId": "get_system_refund_requests",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "review",
            "schema": {
              "enum": [
                "pending",
                "all"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "enum": [
                "wallet",
                "service"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RefundInboxList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "الطلبات وأعداد المراجعات المعلقة حسب البيئة"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو جلسة أو إذن"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو جلسة أو إذن"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو جلسة أو إذن"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو جلسة أو إذن"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو جلسة أو إذن"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "طابور موحد لمراجعة استردادات العملاء",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/refunds": {
      "get": {
        "operationId": "get__api_v1_system_refunds",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RefundHistory"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة الاستردادات عبر PayPal وWaffo وPaddle",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/revenue": {
      "get": {
        "operationId": "get_api_v1_system_revenue",
        "parameters": [
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "month",
            "schema": {
              "description": "all أو UTC YYYY-MM",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Revenue"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "revenue",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/sdk-example": {
      "post": {
        "description": "جلسة Owner لمسؤول المنصة فقط، مع CSRF. تُرفض مفاتيح API. يعيد استخدام المنتج والسياسة المخصصين ولا يجدد التجارب الحالية.",
        "operationId": "post_api_v1_system_sdk-example",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SDKExampleSetup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SDKExampleSetting"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إعداد/تفعيل منتج مثال SDK العام المخصص للمسؤول",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/service/incidents": {
      "get": {
        "description": "",
        "operationId": "get__api_v1_system_service_incidents",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceIncidentList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة جميع إشعارات الخدمة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "post": {
        "description": "تتطلب الصيانة غير الطارئة إشعارًا قبل 24 ساعة على الأقل. يُضاف رصيد عن الوقت المدفوع المتأثر فعليًا بحادث مستمر متحقق منه يتجاوز 24 ساعة؛ ولا تُعوض الفترات المتداخلة مرتين. قد تؤهل مدة تتجاوز سبعة أيام لاسترداد الخدمة غير المستخدمة.",
        "operationId": "post__api_v1_system_service_incidents",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceIncidentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceIncident"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "نشر صيانة أو حل حادث",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/settings": {
      "get": {
        "operationId": "get_api_v1_system_settings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SystemSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "get /system/settings",
        "x-platform-admin": true,
        "x-required-role": "owner"
      },
      "patch": {
        "operationId": "patch_api_v1_system_settings",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "patch /system/settings",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/test-mail": {
      "post": {
        "description": "إدراج رسالة اختبار حقيقية واحدة صراحة في الطابور للمستلم المحدد باستخدام خدمة التسليم المحفوظة. يؤكد HTTP 202 قبول الطابور، لا وصول الرسالة إلى صندوق الوارد. تابع حالة المهمة وافحص لوحة الموفّر/صندوق الوارد لمشكلات التسليم.",
        "operationId": "post_api_v1_system_test-mail",
        "parameters": [
          {
            "description": "مطلوب لعمليات كتابة cookie/public-auth؛ ويُستثنى فقط لعمليات كتابة الموارد المدعومة باستخدام Bearer",
            "in": "header",
            "name": "X-CSRF-Token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestMail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailQueued"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "post /system/test-mail",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/tls": {
      "get": {
        "description": "جلسة متصفح مسؤول المنصة فقط. تُرفض مفاتيح API للإدارة ومالكو المستأجرين. تعكس الشهادة المستخدمة في هذه العملية. لا يُكشف PEM للشهادة أو المفتاح الخاص.",
        "operationId": "get__api_v1_system_tls",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TLSStatus"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح؛ لا تُعاد إلا بيانات الشهادة العامة الوصفية."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة شهادة HTTPS النشطة"
      },
      "patch": {
        "description": "جلسة متصفح مسؤول المنصة فقط. تُرفض مفاتيح API للإدارة ومالكو المستأجرين. تتحقق من الشهادة/المفتاح وتشفّرهما في MySQL، وتسجل حدث تدقيق، ثم تستبدل الشهادة النشطة. تستخدمها مصافحات TLS الجديدة فورًا؛ وتستمر الاتصالات الحالية طبيعيًا. تستخدم إعادة التشغيل شهادة قاعدة البيانات قبل ملفات التمهيد.",
        "operationId": "patch__api_v1_system_tls",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TLSCertificateUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TLSCertificateResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح؛ لا تُعاد إلا بيانات الشهادة العامة الوصفية."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "استبدال شهادة HTTPS فورًا"
      }
    },
    "/api/v1/system/tls/check": {
      "post": {
        "description": "جلسة متصفح مسؤول المنصة فقط. تُرفض مفاتيح API للإدارة ومالكو المستأجرين. تفحص التنسيق وقوة المفتاح وتطابقه واسم المضيف والصلاحية وسلسلة الثقة. يجب تفعيل HTTPS المباشر. لا تتغير الشهادة النشطة.",
        "operationId": "post__api_v1_system_tls_check",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TLSCertificateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TLSCertificateInfo"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح؛ لا تُعاد إلا بيانات الشهادة العامة الوصفية."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code. تبقي TLS_KEY_MISMATCH وTLS_DOMAIN_MISMATCH وTLS_EXPIRED وTLS_CHAIN_UNTRUSTED وTLS_SETTINGS_CONFLICT الشهادة السابقة في مكانها."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من شهادة ومفتاح خاص دون حفظ"
      }
    },
    "/api/v1/system/translation": {
      "get": {
        "description": "جلسة platform-admin فقط.",
        "operationId": "get__api_v1_system_translation",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة إعدادات DeepL دون كشف مفتاح API"
      },
      "patch": {
        "description": "جلسة platform-admin فقط. استخدم expected_version من أحدث GET. لا يُعاد المفتاح مطلقًا.",
        "operationId": "patch__api_v1_system_translation",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranslationSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationSettings"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حفظ إعدادات DeepL المشفرة"
      }
    },
    "/api/v1/system/translation/check": {
      "post": {
        "description": "تستدعي فقط واجهتي لغات DeepL واستخدامه؛ ولا يُرسل محتوى المنتدى.",
        "operationId": "post__api_v1_system_translation_check",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationCheck"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع error.code وerror.message؛ يحدد request_id الطلب."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من مفتاح API المحفوظ وجلب اللغات المدعومة والاستخدام"
      }
    },
    "/api/v1/system/users": {
      "get": {
        "description": "جلسة platform-admin فقط. تشمل الحسابات غير المتحقق منها وأعضاء الفريق؛ ولا تعيد التجزئات أو رموز المصادقة مطلقًا.",
        "operationId": "get__api_v1_system_users",
        "parameters": [
          {
            "description": "مطابقة جزئية للبريد أو الاسم أو مساحة العمل دون تمييز حالة الأحرف؛ وتُهَرّب أحرف البدل.",
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 254,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disabled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "schema": {
              "enum": [
                "owner",
                "read_only"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "verified",
            "schema": {
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformUserList"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة جميع المستخدمين المسجلين"
      }
    },
    "/api/v1/system/users/export.csv": {
      "get": {
        "description": "جلسة platform-admin فقط. حد أقصى 10000 سجل مطابق، مع UTF-8 BOM وتهريب صيغ جداول البيانات. دون بيانات اعتماد.",
        "operationId": "get__api_v1_system_users_export_csv",
        "parameters": [
          {
            "description": "مطابقة جزئية للبريد أو الاسم أو مساحة العمل دون تمييز حالة الأحرف؛ وتُهَرّب أحرف البدل.",
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 254,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disabled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "schema": {
              "enum": [
                "owner",
                "read_only"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "verified",
            "schema": {
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "مرفق CSV"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تصدير المستخدمين المسجلين المصفّين بصيغة CSV"
      }
    },
    "/api/v1/system/users/{id}": {
      "get": {
        "description": "جلسة platform-admin فقط. تُفصل أرصدة مساحة العمل وأحدث 20 عقدًا وإجماليات PayPal المدفوعة/المستردة التراكمية حسب العملة والبيئة.",
        "operationId": "get__api_v1_system_users__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformUserDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة تفاصيل العميل ومساحة العمل"
      },
      "patch": {
        "description": "جلسة platform-admin فقط. تتطلب سبب العملية وإصدارًا للتحكم التفاؤلي. يؤدي التعطيل إلى إلغاء الجلسات والمفاتيح وروابط الدخول الموجودة. لا تستعيد إعادة التفعيل المفاتيح. حسابات مسؤولي المنصة محمية.",
        "operationId": "patch__api_v1_system_users__id_",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformUserUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformUserDetail"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تحديث حالة العميل أو ملاحظة المسؤول الخاصة"
      }
    },
    "/api/v1/system/users/{id}/data-export": {
      "post": {
        "description": "متاح بعد إغلاق الحساب وبعد الموعد النهائي للعميل. يتطلب كلمة مرور المسؤول والنطاق وسببًا تشغيليًا مدققًا. لا تُمحى سجلات الأعمال.",
        "operationId": "post__api_v1_system_users__id__data_export",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerDataExportInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تصدير سجلات العملاء المحتفظ بها",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/system/users/{id}/revoke-credentials": {
      "post": {
        "description": "جلسة platform-admin فقط. لا يعطّل الحساب؛ ويمكن للعميل الدخول مجددًا. لا يمكن إلغاء بيانات اعتماد المسؤول هنا.",
        "operationId": "post__api_v1_system_users__id__revoke_credentials",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformReason"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformRevocation"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "إلغاء جلسات العميل ومفاتيح API الموجودة"
      }
    },
    "/api/v1/system/waffo": {
      "get": {
        "operationId": "get__api_v1_system_waffo",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoSettings"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قراءة إعدادات Waffo دون مفتاح التوقيع",
        "x-licentivo-access": "platform"
      },
      "patch": {
        "operationId": "patch__api_v1_system_waffo",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaffoSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoSettings"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "حفظ بيانات اعتماد Waffo المشفرة",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/waffo/check": {
      "post": {
        "operationId": "post__api_v1_system_waffo_check",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoCheck"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "التحقق من بيانات اعتماد Waffo والمنتج النشط لمرة واحدة",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/waffo/orders": {
      "get": {
        "operationId": "get__api_v1_system_waffo_orders",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderList"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "قائمة مدفوعات خدمة Waffo وشحن المحفظة",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/waffo/orders/{id}/reconcile": {
      "post": {
        "operationId": "post__api_v1_system_waffo_orders__id__reconcile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "معرّف دفع الخدمة المحلي.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WaffoOrderResult"
                    },
                    "request_id": {
                      "description": "معرّف دفع الخدمة المحلي.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "استعادة دفعة Waffo الأصلية وتسويتها",
        "x-licentivo-access": "platform"
      }
    },
    "/api/v1/system/workspaces/{id}/status": {
      "patch": {
        "description": "جلسة platform-admin فقط. يمنع التعليق الدخول وAPI الإدارة والترخيص عبر الإنترنت ويلغي بيانات الاعتماد. يستمر سريان انتهاء العقد. مساحات عمل المنصة محمية؛ وتظل ذاكرات التخزين المؤقت الموقعة دون اتصال خاضعة لانتهائها الحالي.",
        "operationId": "patch__api_v1_system_workspaces__id__status",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformWorkspaceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformWorkspaceStatus"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "افحص error.code وerror.message."
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "تعليق مساحة عمل العميل كلها أو استعادتها"
      }
    },
    "/api/v1/system/{provider}/orders/{id}/refund": {
      "post": {
        "description": "جلسة مسؤول المنصة. تتطلب الخدمة المدفوعة الإلغاء بدلًا من ذلك. تُسترد الدفعة غير المطبقة دون حركات محفظة. يحفظ request_id الثابت النية قبل استدعاء البوابة؛ ويُستعلم عن النتائج المجهولة ولا يعاد إرسالها بصورة عمياء مطلقًا.",
        "operationId": "post__api_v1_system__provider__orders__id__refund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "enum": [
                "waffo",
                "paddle"
              ],
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OriginalRefundInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OriginalRefundResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "خطأ تحقق أو ملكية أو بيئة أو حالة استرداد أو موفّر"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "بدء استرداد عبر القناة الأصلية لرصيد غير منفق أو دفعة غير مطبقة",
        "x-platform-admin": true,
        "x-required-role": "owner"
      }
    },
    "/api/v1/usage": {
      "get": {
        "description": "يبلغ الشهر الحالي عن تسجيلات الأجهزة النشطة؛ وتبلغ الأشهر السابقة عن سجل استخدام الأجهزة المسجل. تتبع حصص API للحزم المشتراة أشهر حصصها الخاصة. يُحتفظ بسجل الأجهزة بعد التحرير. الإشغال الحالي وذروات الفوترة قياسان منفصلان.",
        "operationId": "get_api_v1_usage",
        "parameters": [
          {
            "description": "الشهر التقويمي UTC؛ الافتراضي هو الحالي",
            "in": "query",
            "name": "month",
            "schema": {
              "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
              "pattern": "^[0-9]{4}-[0-9]{2}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "active_devices": 0,
                    "api_calls": 0,
                    "api_period": null,
                    "billable_devices": 0,
                    "estimated_total_cents": 0,
                    "estimated_total_micros": 0,
                    "month": "2026-09",
                    "operations": [],
                    "overage_devices": 0,
                    "period": null,
                    "products": [],
                    "purchased": null,
                    "purchased_active_devices": 0,
                    "sandbox": false,
                    "timezone": "UTC",
                    "warning": "normal"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Usage",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "DEFAULT_PLAN_DISABLED",
                    "message": "The default allowance plan has not been enabled by the administrator"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "الحصة الافتراضية معطلة (DEFAULT_PLAN_DISABLED)"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "Current device occupancy, historical device use and metered API usage",
        "x-management-reference": {
          "group": "usage"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/usage/devices": {
      "get": {
        "description": "سجلات استخدام الأجهزة لشهر UTC المحدد، وتبقى بعد تحرير الجهاز. هذا سجل نشاط وليس قائمة الأجهزة المتصلة حاليًا. استخدم GET /api/v1/usage للإشغال الحالي.",
        "operationId": "get_api_v1_usage_devices",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "الشهر التقويمي UTC؛ الافتراضي هو الحالي",
            "in": "query",
            "name": "month",
            "schema": {
              "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
              "pattern": "^[0-9]{4}-[0-9]{2}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "product_id",
            "schema": {
              "description": "UUID المنتج في مساحة العمل الحالية.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "device_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "first_seen_at": "2026-09-01T00:00:00Z",
                        "last_seen_at": "2026-09-30T00:00:00Z",
                        "month": "2026-09",
                        "product_id": "11111111-1111-4111-8111-111111111111"
                      }
                    ],
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UsageDeviceList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة أجهزة الاستخدام",
        "x-management-reference": {
          "group": "usage"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/usage/export.csv": {
      "get": {
        "description": "سجلات استخدام الأجهزة لشهر UTC المحدد، وتبقى بعد تحرير الجهاز. هذا سجل نشاط وليس قائمة الأجهزة المتصلة حاليًا. استخدم GET /api/v1/usage للإشغال الحالي.",
        "operationId": "get_api_v1_usage_export_csv",
        "parameters": [
          {
            "description": "الشهر التقويمي UTC؛ الافتراضي هو الحالي",
            "in": "query",
            "name": "month",
            "schema": {
              "description": "شهر UTC بتنسيق YYYY-MM؛ تستخدم قيم الاستعلام المحذوفة الشهر الحالي. تتطلب مهام الفوترة شهرًا مغلقًا.",
              "pattern": "^[0-9]{4}-[0-9]{2}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "example": "month,product_id,device_id,first_seen_utc,last_seen_utc\n",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "تصدير الاستخدام",
        "x-csv-columns": [
          "month",
          "product_id",
          "device_id",
          "first_seen_utc",
          "last_seen_utc"
        ],
        "x-management-reference": {
          "group": "usage"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/validate": {
      "post": {
        "description": "تتم المصادقة بواسطة product_id + license_key + device_id. دون cookie/CSRF/مفتاح المورّد. يلزم activation_id باستثناء activate. يستهلك كل طلب ناجح استدعاء API واحدًا؛ ولا تستهلك الإعادة المتطابقة أو حالات الفشل شيئًا. تُخصم الزيادة من المحفظة ذريًا أو يعاد API_QUOTA_EXCEEDED/API_BALANCE_INSUFFICIENT. تنتهي إيصالات إعادة محاولة التحقق وضربات القلب بعد 3600 ثانية. ما دام الترخيص الأصلي صالحًا، تعاد الطلبات المطابقة داخل هذه النافذة دون خصم آخر. بعد النافذة استخدم مفتاحًا جديدًا؛ وقد يعالج المفتاح المستخدم سابقًا كطلب جديد. تبقى إيصالات التفعيل وإلغاء التفعيل واستخدام الميزات دائمة. تتبع حصة أجهزة مساحة العمل التفعيلات الحالية. يعيد التحرير السعة؛ ويعيد انتهاء إيجار المقعد العائم السعة أيضًا، بينما يظل التسجيل العادي دون اتصال محسوبًا. لا تُفرض رسوم زيادة الأجهزة إلا عندما تتجاوز ذروة فوترة شهر الحصة السعة المدفوعة سابقًا؛ ولا يعيد التحرير الرسوم المتكبدة. استخدام API منفصل.",
        "operationId": "post_api_v1_validate",
        "parameters": [
          {
            "description": "أنشئ مفتاحًا جديدًا لكل عملية؛ تحتفظ إعادة المحاولة بالمفتاح والجسم نفسيهما. الحد الأقصى 80 محرفًا دون مسافات بيضاء. اختياري للتحقق وضربات القلب.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 80,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RuntimeResult"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "التحقق وقت التشغيل"
      }
    },
    "/api/v1/webhook-deliveries/{id}/attempts": {
      "get": {
        "operationId": "get_api_v1_webhook-deliveries_by_id_attempts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": null
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttemptList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة محاولات التسليم",
        "x-management-reference": {
          "group": "webhooks"
        },
        "x-required-scope": "read"
      }
    },
    "/api/v1/webhook-deliveries/{id}/retry": {
      "post": {
        "operationId": "post_api_v1_webhook-deliveries_by_id_retry",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ID",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "إعادة محاولة تسليم webhook",
        "x-management-reference": {
          "group": "webhooks"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "operationId": "get_api_v1_webhooks",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "event_types": [],
                    "items": [
                      {
                        "created_at": "2026-10-18T00:00:00Z",
                        "enabled": true,
                        "events": [],
                        "id": "33333333-3333-4333-8333-333333333333",
                        "name": "Report app",
                        "updated_at": "2026-10-18T00:00:00Z",
                        "url": "https://merchant.example.com/license-events"
                      }
                    ]
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicensingWebhookList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة webhooks",
        "x-management-reference": {
          "group": "webhooks"
        },
        "x-required-scope": "read"
      },
      "post": {
        "operationId": "post_api_v1_webhooks",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "enabled": true,
                "events": [
                  "license.created",
                  "license.renewed"
                ],
                "name": "Order system",
                "url": "https://merchant.example.com/license-events"
              },
              "schema": {
                "$ref": "#/components/schemas/LicensingWebhookInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "33333333-3333-4333-8333-333333333333",
                    "secret": "whsec_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LicensingWebhookSecret",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "حفظ webhook",
        "x-management-reference": {
          "group": "webhooks"
        },
        "x-required-role": "owner",
        "x-required-scope": "write"
      }
    },
    "/api/v1/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "get_api_v1_webhooks_by_id_deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "المعرّف الفريد لهذا المورد؛ استخدم معرّف المورد المطابق في المسار.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 25,
              "description": "حجم الصفحة، الافتراضي 25، النطاق 1–100.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "description": "السجلات المراد تخطيها، الافتراضي 0، النطاق 0–100000؛ أضف limit للصفحة التالية.",
              "maximum": 100000,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": null,
                    "limit": 25,
                    "offset": 0,
                    "total": 1
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeliveryList",
                      "description": "نتيجة العمل عند النجاح؛ تستخدم حالات الفشل error بدلًا منها."
                    },
                    "request_id": {
                      "description": "UUID تتبع HTTP من المستوى الأعلى. في مدخل batch/onboarding هو UUID لعدم التكرار ينشئه المستدعي؛ ولكل منهما غرض مختلف.",
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_INPUT",
                    "message": "Invalid request fields"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHENTICATED",
                    "message": "Please sign in again"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "This operation requires an owner account"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "Method not allowed"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "This value already exists"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "JSON_REQUIRED",
                    "message": "Use Content-Type: application/json"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Too many attempts; try again later"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "An unexpected error occurred"
                  },
                  "request_id": "55555555-5555-4555-8555-555555555555"
                },
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "managementKey": []
          }
        ],
        "summary": "قائمة عمليات تسليم webhook",
        "x-management-reference": {
          "group": "webhooks"
        },
        "x-required-scope": "read"
      }
    },
    "/healthz": {
      "get": {
        "operationId": "get_healthz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Health"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          }
        },
        "security": [],
        "summary": "حالة حياة العملية"
      }
    },
    "/readyz": {
      "get": {
        "operationId": "get_readyz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Health"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "نجاح"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "راجع docs/error-codes.md؛ تنطبق حسب الواجهة"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "قاعدة البيانات غير متاحة"
          }
        },
        "security": [],
        "summary": "جاهزية قاعدة البيانات"
      }
    }
  },
  "servers": [
    {
      "url": "https://www.licentivo.com"
    }
  ]
}
