{
  "components": {
    "schemas": {
      "Checkout": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "properties": {
              "checkout_url": {
                "format": "uri",
                "type": "string"
              },
              "fulfillment": {
                "type": "string"
              }
            },
            "required": [
              "fulfillment"
            ],
            "type": "object"
          }
        ]
      },
      "Credential": {
        "properties": {
          "license_key": {
            "description": "لـ SDK الرسمي فقط؛ لا تصرح بالوصول بفحص هذه القيمة مطلقًا.",
            "type": "string",
            "x-sensitive": true
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "valid_until": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "product_id",
          "license_key",
          "valid_until",
          "version"
        ],
        "type": "object"
      },
      "EntitlementStatus": {
        "properties": {
          "account_url": {
            "format": "uri",
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "max_retry_attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "next_action": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "retry_after_seconds": {
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "enum": [
              "ready",
              "pending",
              "expired",
              "suspended",
              "not_purchased"
            ],
            "type": "string"
          },
          "synchronized": {
            "type": "boolean"
          },
          "valid_from": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "valid_until": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "product_id",
          "environment",
          "status",
          "code",
          "message",
          "next_action",
          "account_url",
          "synchronized",
          "retry_after_seconds",
          "max_retry_attempts"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "error",
          "request_id"
        ],
        "type": "object"
      },
      "ExternalCapabilities": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "delivery_types": {
            "items": {
              "enum": [
                "license_key",
                "activation_url",
                "instructions"
              ],
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "devices": {
            "const": false,
            "type": "boolean"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "identity_exchange": {
            "const": false,
            "type": "boolean"
          },
          "protocol": {
            "const": "launch-external-licensing-v1",
            "type": "string"
          },
          "purchase_types": {
            "items": {
              "enum": [
                "perpetual",
                "fixed_term"
              ],
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "protocol",
          "connection_ref",
          "environment",
          "purchase_types",
          "delivery_types"
        ],
        "type": "object"
      },
      "ExternalCapabilitiesResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalCapabilities"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalConnection": {
        "additionalProperties": false,
        "properties": {
          "activation_origins": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "type": "array"
          },
          "allow_local_http": {
            "type": "boolean"
          },
          "allow_private_network": {
            "type": "boolean"
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/ExternalCapabilities"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "credential_stored": {
            "type": "boolean"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "key_id": {
            "type": "string"
          },
          "last_check_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_checked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "const": "custom_http",
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "name",
          "base_url",
          "environment",
          "connection_ref",
          "key_id",
          "credential_stored",
          "allow_private_network",
          "allow_local_http",
          "activation_origins",
          "capabilities",
          "last_checked_at",
          "last_check_error"
        ],
        "type": "object"
      },
      "ExternalConnectionInput": {
        "additionalProperties": false,
        "properties": {
          "activation_origins": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "type": "array"
          },
          "allow_local_http": {
            "default": false,
            "description": "يُسمح فقط بـ HTTP الحلقي في sandbox.",
            "type": "boolean"
          },
          "allow_private_network": {
            "default": false,
            "type": "boolean"
          },
          "base_url": {
            "format": "uri",
            "maxLength": 512,
            "type": "string"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "key_id": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 2,
            "type": "string"
          },
          "provider": {
            "const": "custom_http",
            "type": "string"
          },
          "signing_key": {
            "description": "Base64 قياسي من 32-128 بايت عشوائيًا؛ مطلوب عند الإنشاء، وتحافظ القيمة الفارغة على المفتاح الحالي عند التعديل.",
            "maxLength": 180,
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "provider",
          "name",
          "base_url",
          "environment",
          "connection_ref",
          "key_id"
        ],
        "type": "object"
      },
      "ExternalConnectionResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalConnection"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalDelivery": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalDeliveryValue"
              },
              {
                "type": "null"
              }
            ]
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "ready",
              "unavailable"
            ],
            "type": "string"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "connection_ref",
          "environment",
          "entitlement_ref",
          "version",
          "status",
          "delivery"
        ],
        "type": "object"
      },
      "ExternalDeliveryResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalDelivery"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalDeliveryValue": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "enum": [
              "license_key",
              "activation_url",
              "instructions"
            ],
            "type": "string"
          },
          "value": {
            "description": "محتوى حساس؛ الحد الأقصى 4096 بايت UTF-8. لا تسجّله أبدًا في السجلات. يجب أن تستخدم روابط التفعيل أصل HTTPS مهيّأً.",
            "maxLength": 4096,
            "type": "string"
          }
        },
        "required": [
          "type",
          "value",
          "expires_at"
        ],
        "type": "object"
      },
      "ExternalError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "request_id"
        ],
        "type": "object"
      },
      "ExternalMapping": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "format": "uuid",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "environment",
          "connection_id",
          "product_ref",
          "plan_ref"
        ],
        "type": "object"
      },
      "ExternalMappingInput": {
        "additionalProperties": false,
        "properties": {
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "product_ref",
          "plan_ref"
        ],
        "type": "object"
      },
      "ExternalReceipt": {
        "additionalProperties": false,
        "properties": {
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "maxLength": 96,
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "payload_sha256": {
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "applied",
              "rejected",
              "manual_review"
            ],
            "type": "string"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "event_id",
          "connection_ref",
          "environment",
          "entitlement_ref",
          "version",
          "payload_sha256",
          "status",
          "error_code"
        ],
        "type": "object"
      },
      "ExternalReceiptResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExternalReceipt"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ExternalSnapshot": {
        "additionalProperties": false,
        "properties": {
          "account_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "change_reason": {
            "enum": [
              "purchase",
              "renewal",
              "upgrade",
              "refund",
              "reversal",
              "suspension",
              "resumption",
              "expiry",
              "reconciliation"
            ],
            "type": "string"
          },
          "connection_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "desired_state": {
            "enum": [
              "active",
              "suspended",
              "expired",
              "revoked"
            ],
            "type": "string"
          },
          "entitlement_ref": {
            "pattern": "^[A-Za-z0-9_-]{1,128}$",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "launch_plan_version_id": {
            "format": "uuid",
            "type": "string"
          },
          "launch_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "plan_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "type": "string"
          },
          "schema": {
            "const": "launch-external-licensing-v1",
            "type": "string"
          },
          "type": {
            "const": "entitlement.snapshot",
            "type": "string"
          },
          "valid_from": {
            "format": "date-time",
            "type": "string"
          },
          "valid_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "schema",
          "event_id",
          "connection_ref",
          "environment",
          "type",
          "change_reason",
          "account_ref",
          "entitlement_ref",
          "launch_product_id",
          "launch_plan_version_id",
          "product_ref",
          "plan_ref",
          "version",
          "desired_state",
          "valid_from",
          "valid_until"
        ],
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "data": {
            "properties": {
              "status": {
                "const": "ok"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "type": "object"
      },
      "IntegrationBundle": {
        "properties": {
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "checks": {
            "items": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "status",
                "message"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "config": {
            "additionalProperties": false,
            "properties": {
              "environment": {
                "enum": [
                  "sandbox",
                  "live"
                ],
                "type": "string"
              },
              "launch_product_id": {
                "format": "uuid",
                "type": "string"
              },
              "licentivo_product_id": {
                "anyOf": [
                  {
                    "format": "uuid",
                    "type": "string"
                  },
                  {
                    "const": ""
                  }
                ],
                "description": "فارغ فقط عندما يتعذر على فحص فاشل تحديد التعيين."
              },
              "merchant_origin": {
                "format": "uri",
                "type": "string"
              },
              "schema_version": {
                "const": 1,
                "type": "integer"
              }
            },
            "required": [
              "schema_version",
              "merchant_origin",
              "launch_product_id",
              "licentivo_product_id",
              "environment"
            ],
            "type": "object"
          },
          "example_path": {
            "type": "string"
          },
          "language": {
            "enum": [
              "go",
              "python",
              "csharp",
              "java",
              "javascript",
              "rust",
              "ruby",
              "c",
              "cpp",
              "web"
            ],
            "type": "string"
          },
          "product_config": {
            "$ref": "#/components/schemas/PublicProductConfig"
          },
          "ready": {
            "type": "boolean"
          }
        },
        "required": [
          "ready",
          "config",
          "checks",
          "language",
          "example_path",
          "checked_at"
        ],
        "type": "object"
      },
      "LaunchIdentity": {
        "additionalProperties": false,
        "properties": {
          "audience": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "identity_token": {
            "description": "تأكيد هوية قصير العمر، بحد أقصى 120 ثانية؛ ليس منحة تشغيل مطلقًا.",
            "type": "string"
          },
          "launch_connection_id": {
            "format": "uuid",
            "type": "string"
          },
          "licentivo_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        },
        "required": [
          "identity_token",
          "token_type",
          "product_id",
          "licentivo_product_id",
          "launch_connection_id",
          "environment",
          "audience",
          "expires_at"
        ],
        "type": "object"
      },
      "LicensingConnections": {
        "additionalProperties": false,
        "properties": {
          "bindings": {
            "items": {
              "$ref": "#/components/schemas/ProductLicensingBinding"
            },
            "type": "array"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/ExternalConnection"
            },
            "type": "array"
          },
          "default_provider": {
            "description": "موفّر الترخيص النشط الوحيد لجميع المنتجات وكلتا البيئتين.",
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          },
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/ExternalMapping"
            },
            "type": "array"
          }
        },
        "required": [
          "connections",
          "bindings",
          "mappings",
          "default_provider"
        ],
        "type": "object"
      },
      "LicensingConnectionsResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LicensingConnections"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "LicensingProviderInput": {
        "additionalProperties": false,
        "properties": {
          "provider": {
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider"
        ],
        "type": "object"
      },
      "LicensingSaved": {
        "additionalProperties": false,
        "properties": {
          "saved": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "saved"
        ],
        "type": "object"
      },
      "LicensingSavedResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LicensingSaved"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "LicentivoConnectionInput": {
        "additionalProperties": false,
        "properties": {
          "api_key": {
            "description": "مطلوب للاتصال الأول. احذفه أو اتركه فارغًا للاحتفاظ بمفتاح الخادم المحفوظ.",
            "type": "string",
            "writeOnly": true
          },
          "webhook_secret": {
            "description": "سر اختياري من 32–256 بايت. احذفه أو اتركه فارغًا للاحتفاظ بالسر المحفوظ.",
            "type": "string",
            "writeOnly": true
          }
        },
        "type": "object"
      },
      "Order": {
        "properties": {
          "action": {
            "type": "string"
          },
          "amount_minor": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "plan_name": {
            "type": "string"
          },
          "plan_version": {
            "type": "integer"
          },
          "plan_version_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "product_name": {
            "type": "string"
          },
          "product_slug": {
            "type": "string"
          },
          "purchase_periods": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "product_id",
          "product_name",
          "product_slug",
          "plan_version_id",
          "plan_name",
          "plan_version",
          "action",
          "status",
          "currency",
          "amount_minor",
          "purchase_periods",
          "created_at",
          "paid_at",
          "environment"
        ],
        "type": "object"
      },
      "ProductLicensingBinding": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "provider": {
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "environment",
          "provider",
          "connection_id"
        ],
        "type": "object"
      },
      "ProductLicensingInput": {
        "additionalProperties": false,
        "properties": {
          "connection_id": {
            "description": "UUID الاتصال الخارجي؛ مطلوب لـ custom_http.",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/ExternalMappingInput"
            },
            "type": "array"
          },
          "provider": {
            "description": "يجب أن يطابق موفّر الترخيص النشط للمثيل كله. أعدّه أولًا باستخدام PUT /api/v1/admin/licensing/provider.",
            "enum": [
              "licentivo",
              "custom_http"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider",
          "environment"
        ],
        "type": "object"
      },
      "PublicLaunchConfig": {
        "additionalProperties": false,
        "properties": {
          "environment": {
            "enum": [
              "sandbox",
              "live"
            ],
            "type": "string"
          },
          "launch_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "licentivo_product_id": {
            "format": "uuid",
            "type": "string"
          },
          "merchant_origin": {
            "format": "uri",
            "type": "string"
          },
          "schema_version": {
            "const": 1,
            "type": "integer"
          }
        },
        "required": [
          "schema_version",
          "merchant_origin",
          "launch_product_id",
          "licentivo_product_id",
          "environment"
        ],
        "type": "object"
      },
      "PublicProductConfig": {
        "additionalProperties": false,
        "description": "إعداد عام منقح. يجب على التاجر التحقق من مصدر مفتاح التوقيع.",
        "properties": {
          "app_version": {
            "type": "string"
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "type": "string"
            },
            "maxProperties": 32,
            "minProperties": 1,
            "propertyNames": {
              "description": "معرّفات المفاتيح من 1–128 بايت UTF-8.",
              "minLength": 1,
              "type": "string",
              "x-maxBytes": 128
            },
            "type": "object"
          }
        },
        "required": [
          "product_id",
          "trusted_keys",
          "base_url"
        ],
        "type": "object"
      },
      "PublicProductImport": {
        "additionalProperties": false,
        "description": "إعداد منتج Launch العام المعبأ من معرّف المنتج الرسمي ومفاتيح التوقيع العامة. يُقبل JSON القديم مع license_key/cache_path فارغين وallow_http بقيمة false وتُزال هذه القيم. تُرفض الأسرار المعبأة والحقول المجهولة.",
        "properties": {
          "allow_http": {
            "const": false
          },
          "app_version": {
            "description": "80 بايت UTF-8 كحد أقصى.",
            "type": "string",
            "x-maxBytes": 80
          },
          "base_url": {
            "format": "uri",
            "type": "string"
          },
          "cache_path": {
            "const": ""
          },
          "device_name": {
            "maxLength": 128,
            "type": "string"
          },
          "license_key": {
            "const": ""
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "trusted_keys": {
            "additionalProperties": {
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "type": "string"
            },
            "maxProperties": 32,
            "minProperties": 1,
            "propertyNames": {
              "description": "معرّفات المفاتيح من 1–128 بايت UTF-8.",
              "minLength": 1,
              "type": "string",
              "x-maxBytes": 128
            },
            "type": "object"
          }
        },
        "required": [
          "product_id",
          "trusted_keys"
        ],
        "type": "object"
      },
      "ReadinessResponse": {
        "properties": {
          "data": {
            "properties": {
              "code": {
                "enum": [
                  "DATABASE_NOT_CONFIGURED",
                  "DATABASE_UNAVAILABLE",
                  "DATABASE_SCHEMA_NOT_READY"
                ]
              },
              "status": {
                "enum": [
                  "ready",
                  "not_ready"
                ]
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestID"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "type": "object"
      },
      "RequestID": {
        "description": "يُعاد أيضًا في ترويسة الاستجابة X-Request-ID",
        "pattern": "^[a-f0-9]{32}$",
        "type": "string"
      },
      "SessionGrant": {
        "properties": {
          "access_token": {
            "description": "يُعاد فقط لتسجيل دخول سطح المكتب. عامله كسر؛ ولا تضعه في عناوين URL أو السجلات مطلقًا.",
            "type": "string",
            "x-sensitive": true
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "kind": {
            "enum": [
              "website",
              "desktop"
            ],
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user",
          "kind",
          "expires_at"
        ],
        "type": "object"
      },
      "SessionView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "website",
              "desktop"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "created_at",
          "expires_at",
          "current"
        ],
        "type": "object"
      },
      "User": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "full_access": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "password_change_required": {
            "type": "boolean"
          },
          "role": {
            "enum": [
              "customer",
              "admin",
              "operations",
              "support"
            ],
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "verified",
          "role",
          "full_access",
          "password_change_required"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "desktopBearer": {
        "description": "جلسة سطح مكتب معتمة من auth/login مع kind=desktop.",
        "scheme": "bearer",
        "type": "http"
      },
      "websiteCookie": {
        "description": "جلسة متصفح. تتطلب التغييرات أيضًا Origin وX-CSRF-Token مطابقين من launch_csrf.",
        "in": "cookie",
        "name": "launch_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "واجهات النظام والحساب وترخيص سطح المكتب ومعالج التكامل والشراء الأساسي. هذه ليست واجهة إدارة الموظفين/webhook الدفع الكاملة. يجب أن يمر الوصول وقت التشغيل عبر Licentivo SDK الرسمي. لا يُطلب التحقق من البريد إلا إذا فعّله التاجر. توثق أيضًا اتصالات الترخيص المخصص وتسليم العملاء. تُحدد واجهات المستقبل الخارجي بصورة منفصلة في external-licensing-openapi.json.",
    "license": {
      "identifier": "MIT",
      "name": "MIT"
    },
    "title": "واجهة تكامل Licentivo Launch",
    "version": "0.3.4-beta",
    "x-document-language": "ar"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/admin/connections/licentivo": {
      "post": {
        "operationId": "configureLicentivoConnection",
        "parameters": [
          {
            "in": "header",
            "name": "X-CSRF-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicentivoConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "description": "هوية الاتصال والقدرات المتحقق منها والكتالوج. لا تُعاد الأسرار المحفوظة مطلقًا.",
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "التحقق من اتصال إدارة Licentivo على الخادم وحفظه",
        "tags": [
          "Licentivo connection"
        ]
      }
    },
    "/api/v1/admin/identity-notifications/{id}/retry": {
      "post": {
        "operationId": "retryIdentityNotification",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "maxLength": 500,
                    "minLength": 2,
                    "type": "string"
                  }
                },
                "required": [
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "جُدولت إعادة محاولة الإشعار الأصلي"
          },
          "403": {
            "description": "يلزم إذن المسؤول"
          },
          "409": {
            "description": "اكتمل الإشعار أو تجري معالجته"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "إعادة محاولة إشعار إلغاء أمان الحساب (المسؤول)"
      }
    },
    "/api/v1/admin/integration/check": {
      "post": {
        "description": "يتطلب دور admin. يجب أن يوفر مستدعو الموقع Origin وX-CSRF-Token. تشير ready=false إلى إعداد غير مكتمل؛ ولا تُعاد حقول سرية. قد يكون licentivo_product_id فارغًا في تقرير غير مكتمل.",
        "operationId": "checkApplicationIntegration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  },
                  "language": {
                    "enum": [
                      "go",
                      "python",
                      "csharp",
                      "java",
                      "javascript",
                      "rust",
                      "ruby",
                      "c",
                      "cpp",
                      "web"
                    ],
                    "type": "string"
                  },
                  "product_id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id",
                  "environment",
                  "language"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IntegrationBundle"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قراءة تعيين البرنامج المحدد ومفاتيح التوقيع العامة تلقائيًا لتهيئة SDK مباشرة",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/admin/integration/context": {
      "get": {
        "description": "يتطلب دور admin. يجب أن يوفر مستدعو الموقع Origin وX-CSRF-Token. تشير ready=false إلى إعداد غير مكتمل؛ ولا تُعاد حقول سرية. قد يكون licentivo_product_id فارغًا في تقرير غير مكتمل.",
        "operationId": "getIntegrationContext",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "licensing_origin": {
                          "type": "string"
                        },
                        "merchant_origin": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "merchant_origin",
                        "licensing_origin"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "سياق نشر عام؛ دون إعدادات بدء خاصة"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "حقول أو معرّف منتج أو بيئة غير صالحة."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قراءة مصدر التاجر المهيأ ومصدر الترخيص الثابت",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/admin/licensing/connections": {
      "get": {
        "operationId": "listLicensingChoices",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingConnectionsResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قائمة الاتصالات الخارجية وروابط المنتجات وتعييناتها؛ تحتفظ إعدادات Licentivo بواجهة API الحالية",
        "tags": [
          "Custom licensing"
        ]
      },
      "post": {
        "operationId": "createExternalLicensingConnection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "التحقق من اتصال ترخيص HTTP مخصص وحفظه",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/connections/{id}": {
      "put": {
        "operationId": "updateExternalLicensingConnection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalConnectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "تعديل البيانات الوصفية/مفاتيح التوقيع؛ الوجهة والبيئة وسياسة الشبكة غير قابلة للتغيير",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/connections/{id}/check": {
      "post": {
        "operationId": "checkExternalLicensingConnection",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalConnectionResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "تحديث القدرات؛ تميز last_check_error الفحص الفاشل في استجابة 200",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/licensing/provider": {
      "put": {
        "operationId": "selectLicensingProvider",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicensingProviderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingSavedResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "تفعيل موفّر ترخيص واحد للمثيل كله؛ يتطلب التبديل ترحيلًا عند وجود طلبات لموفّر آخر",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/products/{id}/licensing": {
      "put": {
        "operationId": "configureProductLicensing",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductLicensingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensingSavedResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "إعداد اتصال المنتج وتعيينات الخطط لبيئة باستخدام موفّر الترخيص النشط",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/admin/refunds/{id}/reconcile": {
      "post": {
        "description": "يراجع المسؤول الاسترداد الأصلي ويستعيد العملية نفسها بعد التحقق من المعاملة الأصلية والمبلغ والعملة في إيصال القناة. عند عدم وجود إيصال، لا تُعاد محاولة الطلب الأصلي غير المكرر إلا خلال 23 ساعة من موافقة Stripe/PayPal الأصلية؛ وبعد المهلة يلزم رقم استرداد القناة الأصلية. تُسجل العملية في التدقيق ولا يُنشأ رقم عملية استرداد جديد.",
        "operationId": "reconcileRefund",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "external_refund_id": {
                    "maxLength": 128,
                    "type": "string"
                  },
                  "reason": {
                    "maxLength": 500,
                    "minLength": 2,
                    "type": "string"
                  }
                },
                "required": [
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "أُعيد إدراج المهمة الأصلية في الطابور"
          },
          "403": {
            "description": "يلزم إذن المسؤول وبيانات CSRF صالحة"
          },
          "409": {
            "description": "تعارض حالة أو عدم تطابق إيصال أو الحاجة إلى رقم استرداد القناة الأصلية"
          },
          "503": {
            "description": "استعلام القناة الأصلية غير متاح مؤقتًا"
          }
        },
        "security": [
          {
            "websiteCookie": []
          }
        ],
        "summary": "مراجعة مهمة الاسترداد الأصلية واستعادتها"
      }
    },
    "/api/v1/auth/complete-email": {
      "post": {
        "operationId": "completeAccountEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  },
                  "token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [],
        "summary": "إكمال بيانات بريد أحادية الاستخدام",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/email": {
      "post": {
        "operationId": "requestAccountEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "verify",
                      "reset"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "kind"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "accepted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "accepted"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [],
        "summary": "طلب بريد تحقق أو استعادة كلمة المرور",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/identity-keys": {
      "get": {
        "operationId": "launchIdentityPublicKeys",
        "responses": {
          "200": {
            "description": "مفاتيح Ed25519 عامة؛ وليست مواد توقيع خاصة مطلقًا"
          }
        },
        "summary": "مفاتيح التوقيع العامة المثبتة لهوية حساب Launch"
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "description": "اضبط kind=desktop للتطبيقات واحذف ترويسة Origin للمتصفح. يضبط دخول الموقع ملفات cookie ويحذف access_token.",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "kind": {
                    "default": "website",
                    "enum": [
                      "desktop",
                      "website"
                    ],
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SessionGrant"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [],
        "summary": "تسجيل الدخول إلى الموقع أو سطح المكتب",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "إلغاء الجلسة الحالية؛ تظل عمليات إغلاق SDK والتنظيف المحلي وتحرير الجهاز إجراءات منفصلة",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "operationId": "registerCustomer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "type": "string"
                  },
                  "password": {
                    "description": "12–128 بايت UTF-8 (يحسب الخادم البايتات وليس محارف Unicode).",
                    "type": "string",
                    "writeOnly": true,
                    "x-maxBytes": 128,
                    "x-minBytes": 12
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "accepted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "accepted"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [],
        "summary": "تسجيل عميل؛ يتبع التحقق إعدادات بريد التاجر",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/licensing/documentation": {
      "get": {
        "operationId": "readExternalLicensingGuide",
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "مستند عام"
          }
        },
        "security": [],
        "summary": "وثائق الترخيص الخارجي العامة"
      }
    },
    "/api/v1/licensing/protocol": {
      "get": {
        "operationId": "readExternalLicensingProtocol",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "مستند عام"
          }
        },
        "security": [],
        "summary": "وثائق الترخيص الخارجي العامة"
      }
    },
    "/api/v1/me": {
      "get": {
        "operationId": "currentUser",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "session_id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "user": {
                          "$ref": "#/components/schemas/User"
                        }
                      },
                      "required": [
                        "user",
                        "session_id"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قراءة الحساب المصادق عليه",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/orders": {
      "get": {
        "operationId": "listOrders",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      },
                      "type": "array"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قائمة طلبات العميل الحالي",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/products/{id}/delivery": {
      "get": {
        "operationId": "readOwnedExternalDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": true,
            "schema": {
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalDeliveryResponse"
                }
              }
            },
            "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": "يلزم مسؤول، أو CSRF غير صالح، أو نطاق ممنوع"
          },
          "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": "محدود المعدل"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "التخزين/الخدمة الخارجية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قراءة التسليم الخارجي الحالي المملوك؛ ليس قرار ترخيص وقت التشغيل مطلقًا",
        "tags": [
          "Custom licensing"
        ]
      }
    },
    "/api/v1/me/sessions": {
      "get": {
        "operationId": "listSessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SessionView"
                      },
                      "type": "array"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قائمة جلسات الحساب النشطة",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/me/sessions/{id}": {
      "delete": {
        "operationId": "revokeSession",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "completed": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "completed"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "إلغاء جلسة مملوكة",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders": {
      "post": {
        "description": "تُحسب الأسعار على الخادم. يتطلب التجديد والترقية عرضًا يصدره الخادم. اتبع صفحة الدفع المستضافة؛ ولا يثبت الرجوع من إعادة التوجيه الدفع.",
        "operationId": "createCheckout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "enum": [
                      "purchase",
                      "renew",
                      "upgrade"
                    ],
                    "type": "string"
                  },
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  },
                  "idempotency_key": {
                    "description": "معرّف عملية ثابت، 16–80 بايت UTF-8. أعد استخدام المفتاح نفسه لمحاولات العملية نفسها.",
                    "type": "string",
                    "x-maxBytes": 80,
                    "x-minBytes": 16
                  },
                  "plan_version_id": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "product_id": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "provider": {
                    "enum": [
                      "stripe",
                      "paypal",
                      "waffo",
                      "paddle"
                    ],
                    "type": "string"
                  },
                  "purchase_periods": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "quote_token": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "product_id",
                  "plan_version_id",
                  "environment",
                  "provider",
                  "idempotency_key"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "إنشاء عملية دفع مملوكة أو استعادتها باستخدام مفتاح عدم تكرار ثابت",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "operationId": "getOrder",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "قراءة طلب مملوك وتقدم تنفيذه",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/orders/{id}/reconcile": {
      "post": {
        "operationId": "reconcileOrder",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "required": [],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Checkout"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          },
          {
            "websiteCookie": []
          }
        ],
        "summary": "الاستعلام لدى موفّر الدفع عن طلب مملوك",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/software/products/{id}/credential": {
      "post": {
        "deprecated": true,
        "description": "لا تستطيع جلسات المتصفح جلب مفاتيح الترخيص. لا يُقبل معرّف مستخدم يختاره العميل. يتضمن 403 ENTITLEMENT_PENDING القيمة Retry-After: 3؛ ويجب تحديد محاولات الإعادة. تتطلب EXPIRED/SUSPENDED إجراء المستخدم. تعني 404 ENTITLEMENT_NOT_PURCHASED عدم وجود استحقاق مملوك.",
        "operationId": "softwareCredential",
        "parameters": [
          {
            "description": "معرّف منتج Launch، وليس معرّف منتج Licentivo.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "environment"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "410": {
            "description": "LICENSE_CREDENTIAL_REMOVED؛ لا يُعاد مفتاح ترخيص"
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "أُزيل: يجب على حزم SDK الحساب استخدام تبادل الهوية",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/software/products/{id}/identity": {
      "post": {
        "operationId": "exchangeAccountIdentity",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "live"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "environment"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LaunchIdentity"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "سياق هوية فقط. يقرر Licentivo الترخيص."
          },
          "401": {
            "description": "رُفضت جلسة الحساب"
          },
          "503": {
            "description": "اتصال الهوية غير متاح"
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "الحصول على تأكيد هوية حساب قصير العمر لـ SDK الرسمي"
      }
    },
    "/api/v1/software/products/{id}/status": {
      "get": {
        "description": "هذه معلومات شراء/مزامنة، وليست منحة ترخيص وقت التشغيل.",
        "operationId": "softwareStatus",
        "parameters": [
          {
            "description": "معرّف منتج Launch، وليس معرّف منتج Licentivo.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "environment",
            "required": false,
            "schema": {
              "default": "live",
              "enum": [
                "sandbox",
                "live"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EntitlementStatus"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "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": "LOGIN_FAILED (login) أو AUTH_REQUIRED (جلسة منتهية/ملغاة). امسح الجلسات المرفوضة؛ لا تلجأ إلى بديل بعد رفض صريح مطلقًا."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "ممنوع، أو يلزم التحقق من البريد، أو تغيير كلمة المرور الأولية، أو رفض صريح للاستحقاق."
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "RATE_LIMITED؛ لا تعد المحاولة في حلقة ضيقة.",
            "headers": {
              "Retry-After": {
                "description": "الثواني الواجب انتظارها قبل محاولة أخرى. التزم بهذه القيمة وحدد إجمالي المحاولات.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "فشل مؤقت في الخدمة أو قاعدة البيانات. لا يُسمح بالوصول دون اتصال إلا بمنحة موقعة صالحة من SDK الرسمي."
          }
        },
        "security": [
          {
            "desktopBearer": []
          }
        ],
        "summary": "قراءة حالة قابلة للتصرف للعميل المصادق عليه والمنتج المطلوب",
        "tags": [
          "Application integration"
        ]
      }
    },
    "/api/v1/system/status": {
      "get": {
        "operationId": "getSystemStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "implemented": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "phase": {
                          "const": "local-development"
                        },
                        "product": {
                          "const": "Licentivo Launch"
                        },
                        "sales_enabled": {
                          "const": false
                        },
                        "version": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "product",
                        "version",
                        "phase",
                        "sales_enabled",
                        "implemented"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "$ref": "#/components/schemas/RequestID"
                    }
                  },
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "مرحلة التطوير الحالية ونطاق التنفيذ"
          }
        },
        "summary": "عرض الإصدار ونطاق التنفيذ دون إعدادات أو بيانات اعتماد"
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getLiveness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "عملية HTTP تعمل"
          }
        },
        "summary": "حالة حياة العملية مستقلة عن جاهزية قاعدة البيانات"
      }
    },
    "/readyz": {
      "get": {
        "operationId": "getReadiness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadinessResponse"
                }
              }
            },
            "description": "قاعدة البيانات جاهزة؛ وهذا لا يثبت قبول الدفع أو الترخيص"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadinessResponse"
                }
              }
            },
            "description": "قاعدة البيانات غير مهيأة أو غير متاحة أو تفتقر للجداول المطلوبة"
          }
        },
        "summary": "فحص اتصال MySQL وجداول GORM المطلوبة"
      }
    }
  },
  "servers": [
    {
      "description": "استبدله بمصدر التاجر الخاص بك؛ يسمح HTTP فقط لتطوير sandbox على العنوان الحلقي.",
      "url": "https://shop.example.com"
    }
  ]
}
