{
    "openapi": "3.0.0",
    "info": {
        "title": "Turista Laravel APIs",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://laravel.turista.com.ly/api/v2",
            "description": "🟢 Development Server"
        },
        {
            "url": "http://127.0.0.1:8000/api/v2",
            "description": "🟡 Local Server"
        },
        {
            "url": "http://laravel.test/api/v2",
            "description": "🐱 Marwa Server"
        },
        {
            "url": "https://laravel.turista.ly/api/v2",
            "description": "🔴 Production Server"
        },
        {
            "url": "/api"
        }
    ],
    "paths": {
        "/amenities": {
            "get": {
                "tags": [
                    "amenities"
                ],
                "summary": "Get list of amenities",
                "operationId": "getAmenitiesV2",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                }
            }
        },
        "/availability-list": {
            "get": {
                "tags": [
                    "Availability"
                ],
                "summary": "Get availability list",
                "description": "Returns availability list based on property type and id",
                "operationId": "getAvailabilityListV2",
                "parameters": [
                    {
                        "name": "property_type",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "property_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "400": {
                        "description": "Bad request"
                    }
                }
            }
        },
        "/availability-lists": {
            "get": {
                "tags": [
                    "Availability"
                ],
                "summary": "Get full availability lists",
                "description": "Returns detailed availability list",
                "operationId": "getAvailabilityListsV2",
                "parameters": [
                    {
                        "name": "property_type",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "property_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "400": {
                        "description": "Bad request"
                    }
                }
            }
        },
        "/availability/close": {
            "post": {
                "tags": [
                    "Availability"
                ],
                "summary": "Close availability for a property",
                "description": "Manually close availability dates",
                "operationId": "closeAvailabilityV2",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "detail_id",
                                    "property_type",
                                    "start_date",
                                    "end_date"
                                ],
                                "properties": {
                                    "detail_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "property_type": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2023-12-01"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2023-12-05"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": "Maintenance"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/availability/open/{id}": {
            "delete": {
                "tags": [
                    "Availability"
                ],
                "summary": "Reopen availability",
                "description": "Deletes an availability closure record",
                "operationId": "openAvailabilityV2",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "404": {
                        "description": "Not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/availability/audit-log": {
            "get": {
                "tags": [
                    "Availability"
                ],
                "summary": "Get availability audit log",
                "description": "Retrieves the audit log for availability closures and bookings",
                "operationId": "getAvailabilityAuditLogV2",
                "parameters": [
                    {
                        "name": "property_type",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "detail_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "available",
                                "unavailable",
                                "booking"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/bookings": {
            "get": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Get list of host bookings",
                "operationId": "4989ffff4382f964fbc3f251017fd44d",
                "parameters": [
                    {
                        "name": "state_id",
                        "in": "query",
                        "description": "Filter by state_id (3=Paid, 4=Confirm, 5=Completed, 6=Waiting, 7=Cancelled, 8=Unpaid, 9=Confirmed Deposit)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "booking_source",
                        "in": "query",
                        "description": "Filter by booking_source (web or mobile)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Create new booking",
                "operationId": "46fcd7a76bc15b4d6bf2fd428eb68966",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "detail_id",
                                    "start_date",
                                    "end_date",
                                    "type_of_guest",
                                    "no_of_guest",
                                    "property_type",
                                    "total_amount"
                                ],
                                "properties": {
                                    "detail_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2026-03-10"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2026-03-13"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "format": "time",
                                        "example": "14:00:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "format": "time",
                                        "example": "12:00:00"
                                    },
                                    "type_of_guest": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "no_of_guest": {
                                        "type": "integer",
                                        "example": 4
                                    },
                                    "no_of_extra_guest": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "property_type": {
                                        "type": "integer",
                                        "example": 2
                                    },
                                    "occasion_type_id": {
                                        "description": "5 = normal booking",
                                        "type": "integer",
                                        "example": 5
                                    },
                                    "deposite_type": {
                                        "description": "1 = one night, 2 = fixed amount",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "deposite_amount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 200
                                    },
                                    "total_amount": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 600
                                    },
                                    "action_wallet": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "booking_source": {
                                        "type": "string",
                                        "enum": [
                                            "mobile",
                                            "web"
                                        ],
                                        "example": "mobile"
                                    },
                                    "created_by_id": {
                                        "description": "Required if booking_source = web",
                                        "type": "integer",
                                        "example": 3
                                    },
                                    "customer_token": {
                                        "type": "string"
                                    },
                                    "mixedDays": {
                                        "type": "number",
                                        "example": 0
                                    },
                                    "children": {
                                        "properties": {
                                            "ages": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking created successfully",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {}
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/bookings/{id}": {
            "get": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Get booking information",
                "operationId": "cecb3c6c7dcfa799c963f11112488d92",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "id of Booking",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/TblBooking"
                                        },
                                        {
                                            "properties": {
                                                "contact_phone": {
                                                    "description": "رقم هاتف الطرف الآخر",
                                                    "type": "string"
                                                },
                                                "contact_whatsapp": {
                                                    "description": "رقم واتساب الطرف الآخر",
                                                    "type": "string"
                                                },
                                                "property_images": {
                                                    "description": "صور العقار",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "host_timeout_at": {
                                                    "description": "مهلة المالك للرد",
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "customer_timeout_at": {
                                                    "description": "مهلة الزبون للدفع",
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "remaining_seconds": {
                                                    "description": "الثواني المتبقية للعداد",
                                                    "type": "integer"
                                                },
                                                "cancelation_confirm": {
                                                    "description": "حالة التأكيد على الإلغاء",
                                                    "type": "boolean"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Resource Not Found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/bookings/{id}/cancel": {
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Cancel a booking by customer",
                "operationId": "6417bfe2f0e7fa83b432e41423b445dc",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "تم الإلغاء بنجاح"
                    },
                    "400": {
                        "description": "بيانات غير صحيحة أو حالة لا تسمح بالإلغاء"
                    },
                    "403": {
                        "description": "غير مصرح"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/bookings/{id}/respond": {
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Respond to a waiting booking (accept or reject) by host or authorized staff",
                "operationId": "e1f1a250156a9d7d056bc8a23b91da23",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "action"
                                ],
                                "properties": {
                                    "action": {
                                        "description": "accept = قبول الحجز, reject = رفض الحجز",
                                        "type": "string",
                                        "enum": [
                                            "accept",
                                            "reject"
                                        ]
                                    },
                                    "reason": {
                                        "description": "سبب الرفض (مطلوب عند الرفض)",
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "تمت العملية بنجاح"
                    },
                    "400": {
                        "description": "بيانات غير صحيحة"
                    },
                    "401": {
                        "description": "غير مصرح"
                    },
                    "403": {
                        "description": "ممنوع"
                    },
                    "404": {
                        "description": "الحجز غير موجود"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/bookings/{id}/pay": {
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "Process Booking Payment (Smart Endpoint: Auto-detects Wallet vs Cash based on User Token)",
                "description": "This is a unified payment endpoint. \n     * - If the logged-in user is the **Customer**, it will deduct the amount from their **Wallet** and lock the dates.\n     * - If the logged-in user is the **Property Owner (or Staff)**, it will act as a **Cash Confirmation**, deducting only the platform commission from the owner's wallet and locking the dates.\n     * - No need to send 'amount', the system calculates it securely based on the 'payment_scope'.",
                "operationId": "942e1b097be06c92c1135d72013f103e",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "payment_scope"
                                ],
                                "properties": {
                                    "payment_scope": {
                                        "type": "string",
                                        "enum": [
                                            "full",
                                            "deposit",
                                            "remaining"
                                        ]
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Payment or Confirmation processed successfully"
                    },
                    "400": {
                        "description": "Invalid state, dates not available, or insufficient wallet balance"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Booking not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/ezonepay/initiate": {
            "post": {
                "tags": [
                    "EzonePay"
                ],
                "summary": "Initiate a new payment link",
                "description": "Creates a new payment link restricted to a single payment method via EzonePay gateway.",
                "operationId": "e87def12fb64b97725d9cea2bae74f40",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "amount",
                                    "userId",
                                    "payment_method"
                                ],
                                "properties": {
                                    "amount": {
                                        "description": "The payment amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 150.5
                                    },
                                    "userId": {
                                        "description": "The ID or reference of the user making the payment",
                                        "type": "string",
                                        "example": "1"
                                    },
                                    "payment_method": {
                                        "description": "The specific payment method ID. e.g., 102: موبي كاش, 103: دفع تجريبي, 104: مصرفي باي, 105: يسر باي, 106: إدفع لي, 107: سداد, 108: صحارى باي, 125: يسر باي كيو آر, 128: صحارى باي كيو آر",
                                        "type": "integer",
                                        "enum": [
                                            102,
                                            103,
                                            104,
                                            105,
                                            106,
                                            107,
                                            108,
                                            125,
                                            128
                                        ],
                                        "example": 103
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Payment link created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Payment link created successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 2696
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "orderReference": {
                                                    "type": "string",
                                                    "example": "inv-20260504-204403-nz6IV8"
                                                },
                                                "internalReference": {
                                                    "type": "string",
                                                    "example": "1"
                                                },
                                                "agentName": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "link": {
                                                    "type": "string",
                                                    "example": "https://dlink.ezonepay.ly/VY3HoLDBvTFJRReo6DFnHQ__Q_GZLg"
                                                },
                                                "source": {
                                                    "type": "string",
                                                    "example": "توريستا"
                                                },
                                                "isDirectPayment": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 150.5
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "example": "LYD"
                                                },
                                                "note": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "isEnabled": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "createdAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2026-05-04T18:44:03.4147149Z"
                                                },
                                                "updatedAt": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "expiresAt": {
                                                    "type": "string",
                                                    "example": "غير محدود"
                                                },
                                                "maxUsageCount": {
                                                    "type": "string",
                                                    "example": "1"
                                                },
                                                "currentUsageCount": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "customer": {
                                                    "properties": {
                                                        "firstName": {
                                                            "type": "string",
                                                            "example": "User"
                                                        },
                                                        "lastName": {
                                                            "type": "string",
                                                            "example": "1"
                                                        },
                                                        "phoneNumber": {
                                                            "type": "string",
                                                            "example": "0910000000"
                                                        },
                                                        "phoneNumber2": {
                                                            "type": "string",
                                                            "example": null,
                                                            "nullable": true
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "paymentMethods": {
                                                    "type": "string",
                                                    "example": null,
                                                    "nullable": true
                                                },
                                                "totalAmountPaid": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 0
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Failed to initiate payment",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Failed to initiate payment"
                                        },
                                        "error": {
                                            "type": "string",
                                            "example": "Internal server error details"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/ezonepay/subscribe-webhook": {
            "post": {
                "tags": [
                    "EzonePay"
                ],
                "summary": "Subscribe to EzonePay Webhook",
                "description": "⚠️ SERVER-TO-SERVER ONLY: Registers the webhook URL with EzonePay and returns the SecretKey. Run this once from Postman/Swagger. Not for mobile apps.",
                "operationId": "5903e1653377447b19ffccc053284aae",
                "responses": {
                    "200": {
                        "description": "Subscribed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Subscribed successfully"
                                        },
                                        "secret_key": {
                                            "type": "string",
                                            "example": "BASE64_SECRET_KEY"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/ezonepay/webhook": {
            "post": {
                "tags": [
                    "EzonePay"
                ],
                "summary": "Receive payment status updates from EzonePay",
                "description": "⚠️ SERVER-TO-SERVER ONLY: Webhook endpoint strictly for EzonePay's automated system to notify the application about payment events. It is NOT for mobile apps or frontend clients.",
                "operationId": "325117d6a1bdeb639cd04729bd1575ed",
                "parameters": [
                    {
                        "name": "X-Signature",
                        "in": "header",
                        "description": "HMAC-SHA256 signature for verifying the payload",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "event": {
                                        "description": "Event type, 2 means Paid",
                                        "type": "integer",
                                        "example": 2
                                    },
                                    "transactionId": {
                                        "description": "EzonePay transaction ID",
                                        "type": "integer",
                                        "example": 98765
                                    },
                                    "transactionType": {
                                        "description": "Type of transaction",
                                        "type": "string",
                                        "example": "online"
                                    },
                                    "orderReference": {
                                        "description": "Your custom order reference",
                                        "type": "string",
                                        "example": "INV-2026-001"
                                    },
                                    "updatedUtc": {
                                        "type": "string",
                                        "format": "date-time",
                                        "example": "2026-04-29T10:30:00Z"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Webhook received successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Webhook received successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized (Invalid Signature)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/ezonepay/payment-callback/{user_id}": {
            "get": {
                "tags": [
                    "EzonePay"
                ],
                "summary": "Handle payment callback from EzonePay RedirectUrl",
                "description": "Handles customer redirection from EzonePay after payment process to close the webview.",
                "operationId": "5b221daa2d61dea6cded86572354e790",
                "parameters": [
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "ID of the user",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "invoice_no",
                        "in": "query",
                        "description": "Invoice number sent in the redirect URL",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "HTML Page returned"
                    }
                }
            }
        },
        "/ezonepay/payment-methods": {
            "get": {
                "tags": [
                    "EzonePay"
                ],
                "summary": "Get available payment methods",
                "description": "Fetches available payment methods from EzonePay.",
                "operationId": "d0b842b643ab0ab4422fb6bbbe949e58",
                "responses": {
                    "200": {
                        "description": "Payment methods retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 102
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "موبي كاش"
                                                    },
                                                    "logoUrl": {
                                                        "type": "string",
                                                        "example": "https://ik.imagekit.io/w0vzu9b56/assets/icons/payment/mobiCash.png"
                                                    },
                                                    "method": {
                                                        "type": "string",
                                                        "example": "mobicash"
                                                    },
                                                    "minPayment": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 0.01000000000000000020816681711721685132943093776702880859375
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Failed to get payment methods"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/facilities": {
            "get": {
                "tags": [
                    "facilities"
                ],
                "summary": "Get list of facilities",
                "operationId": "getFacilitiesV2",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                }
            }
        },
        "/property-occasions": {
            "get": {
                "tags": [
                    "Property Configurations"
                ],
                "summary": "Get all property occasion types",
                "description": "Retrieve a list of all available occasion types for properties.",
                "operationId": "f4c98538aee297e4248f75929800bb1b",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "New Year"
                                                    },
                                                    "state_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/home-settings": {
            "get": {
                "tags": [
                    "Home Settings"
                ],
                "summary": "Get featured properties for home page (default or by city) with full filters",
                "operationId": "getHomeSettings",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Records per page (default 10)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "property_type[]",
                        "in": "query",
                        "description": "Property type: 1=Villa, 2=Resort, 3=Chalet, 4=Building, 5=Hotel",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    },
                    {
                        "name": "filter[type_id]",
                        "in": "query",
                        "description": "1=Displayed, 0=Hidden",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[resort_id]",
                        "in": "query",
                        "description": "Filter by resort",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "occasion_type_id",
                        "in": "query",
                        "description": "Occasion type: 1=Wedding, 2=Engagement, 3=Contract, 4=Newborn week, 5=Regular stay, 6=Eid, 7=تلبيسة",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[title]",
                        "in": "query",
                        "description": "Search by title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "latitude",
                        "in": "query",
                        "description": "Latitude",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "longitude",
                        "in": "query",
                        "description": "Longitude",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "filter[children_max_age]",
                        "in": "query",
                        "description": "Maximum age of children",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "city_id",
                        "in": "query",
                        "description": "City ID. 0 or omit for default",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 0
                        }
                    },
                    {
                        "name": "filter[tbl_zone_id]",
                        "in": "query",
                        "description": "Zone ID for filter",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "guest_type",
                        "in": "query",
                        "description": "Guest type",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_type",
                        "in": "query",
                        "description": "Payment type",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "cash",
                                "wallet",
                                "wallet_and_cash",
                                "wallet_plus"
                            ]
                        }
                    },
                    {
                        "name": "start_day_price",
                        "in": "query",
                        "description": "Minimum price per day",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "end_day_price",
                        "in": "query",
                        "description": "Maximum price per day",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    {
                        "name": "price_type_search",
                        "in": "query",
                        "description": "Price type search: both, week_day_price, weekend_day_price",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "both",
                                "week_day_price",
                                "weekend_day_price"
                            ]
                        }
                    },
                    {
                        "name": "availability_date_start",
                        "in": "query",
                        "description": "Availability start date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "availability_date_end",
                        "in": "query",
                        "description": "Availability end date (YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "availability_search_type",
                        "in": "query",
                        "description": "Availability type: full or part",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full",
                                "part"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/home-settings/{id}": {
            "put": {
                "tags": [
                    "Home Settings"
                ],
                "summary": "Add or update a featured property for home page",
                "operationId": "updateHomeSettings",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Property ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "home_order"
                                ],
                                "properties": {
                                    "home_order": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "city_id": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "property_type": {
                                        "type": "integer",
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Updated successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "404": {
                        "description": "Property not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Home Settings"
                ],
                "summary": "Remove a property from featured list (default or city)",
                "operationId": "removeHomeSettings",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Property ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "city_id": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "property_type": {
                                        "type": "integer",
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Removed successfully"
                    },
                    "404": {
                        "description": "Property not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/property-types": {
            "get": {
                "tags": [
                    "Property"
                ],
                "summary": "استرجاع أنواع العقارات المدعومة في النظام",
                "description": "يرجع قائمة هرمية لأنواع العقارات (مثل المنتجعات يتبعها شاليهات، المباني يتبعها شقق)",
                "operationId": "getSupportedPropertyTypes",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "فيلا"
                                                    },
                                                    "name_en": {
                                                        "type": "string",
                                                        "example": "Villa"
                                                    },
                                                    "children": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 5
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "شاليه"
                                                                },
                                                                "name_en": {
                                                                    "type": "string",
                                                                    "example": "Chalet"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/property-units/update": {
            "put": {
                "tags": [
                    "Property"
                ],
                "summary": "Update property units (total & displayed)",
                "description": "Update total units and displayed units for a property based on subscription limits",
                "operationId": "6031c20f867e76df9f75cd6c6d7efca9",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "property_id",
                                    "total_quantity",
                                    "displayed_quantity"
                                ],
                                "properties": {
                                    "property_id": {
                                        "description": "Property ID",
                                        "type": "integer",
                                        "example": 123
                                    },
                                    "total_quantity": {
                                        "description": "Total number of units for this property",
                                        "type": "integer",
                                        "example": 10
                                    },
                                    "displayed_quantity": {
                                        "description": "Number of units to be displayed in the app",
                                        "type": "integer",
                                        "example": 5
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Units updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Units updated successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "property_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "total_quantity": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "displayed_quantity": {
                                                    "type": "integer",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation or subscription error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Displayed quantity cannot exceed total quantity."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/staff": {
            "post": {
                "tags": [
                    "Staff"
                ],
                "summary": "Create a new staff member",
                "operationId": "9daedaf6290504052a006c1c2c2c049d",
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "username",
                                    "role_id",
                                    "phone_number",
                                    "password"
                                ],
                                "properties": {
                                    "first_name": {
                                        "description": "First name of the staff",
                                        "type": "string",
                                        "example": "John"
                                    },
                                    "last_name": {
                                        "description": "Last name of the staff",
                                        "type": "string",
                                        "example": "Doe"
                                    },
                                    "username": {
                                        "description": "Username of the staff",
                                        "type": "string",
                                        "example": "johndoe"
                                    },
                                    "email": {
                                        "description": "Email of the staff member",
                                        "type": "string",
                                        "format": "email",
                                        "example": "john.doe@example.com"
                                    },
                                    "role_id": {
                                        "description": "Role ID of the staff: 1 (CO-Admin), 2 (Booking), 3 (Finance)",
                                        "type": "integer",
                                        "enum": [
                                            1,
                                            2,
                                            3
                                        ],
                                        "example": 1
                                    },
                                    "phone_number": {
                                        "description": "Phone number of the staff member",
                                        "type": "string",
                                        "example": "0915273748"
                                    },
                                    "country_code": {
                                        "description": "Country code of the phone number",
                                        "type": "string",
                                        "example": "+218"
                                    },
                                    "password": {
                                        "description": "Password for the staff account",
                                        "type": "string",
                                        "example": "secret123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Staff created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Staff"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "email": [
                                                    "The email has already been taken."
                                                ],
                                                "role_id": [
                                                    "The selected role_id is invalid."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/staff/{id}": {
            "get": {
                "tags": [
                    "Staff"
                ],
                "summary": "Get staff member(s)",
                "operationId": "af34851c256da49c2322fcae5aff6fa9",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Staff ID (optional, if not provided, will return a list with pagination)",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "perPage",
                        "in": "query",
                        "description": "Number of items per page (pagination)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Field to sort by. Use '-' prefix for descending (e.g., -first_name)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "-id",
                                "first_name",
                                "-first_name",
                                "last_name",
                                "-last_name",
                                "username",
                                "-username",
                                "email",
                                "-email",
                                "role_id",
                                "-role_id",
                                "phone_number",
                                "-phone_number",
                                "is_active",
                                "-is_active"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "$ref": "#/components/schemas/Staff"
                                        },
                                        {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Staff"
                                                    }
                                                },
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Staff not found or not authorized"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Staff"
                ],
                "summary": "Update staff member",
                "operationId": "d519e692cfaf1ed2e249c1dcc9d10444",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Staff ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "first_name",
                        "in": "query",
                        "description": "The first name of the staff member",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "John"
                        }
                    },
                    {
                        "name": "last_name",
                        "in": "query",
                        "description": "The last name of the staff member",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Doe"
                        }
                    },
                    {
                        "name": "username",
                        "in": "query",
                        "description": "The username to be used by the staff member",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "johndoe"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "description": "The email address of the staff member",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "email",
                            "example": "john.doe@example.com"
                        }
                    },
                    {
                        "name": "role_id",
                        "in": "query",
                        "description": "The role ID assigned to the staff member: 1 (CO-Admin), 2 (Booking), 3 (Finance)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "phone_number",
                        "in": "query",
                        "description": "The staff member's phone number",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "234567890"
                        }
                    },
                    {
                        "name": "country_code",
                        "in": "query",
                        "description": "The country code for the phone number",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "218"
                        }
                    },
                    {
                        "name": "password",
                        "in": "query",
                        "description": "The password for the staff member's account, with a minimum of 8 characters",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "minLength": 8,
                            "example": "newpassword123"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Staff updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Staff"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Staff not found or unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Staff member not found or not authorized"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "email": [
                                                    "The email has already been taken."
                                                ],
                                                "role_id": [
                                                    "The selected role id is invalid."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/staff/{id}/status/{action}": {
            "patch": {
                "tags": [
                    "Staff"
                ],
                "summary": "Change staff member status",
                "operationId": "e188bd2f315552fd443e7833c45230a3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Staff ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "action",
                        "in": "path",
                        "description": "Action to perform (1=activate, 0=deactivate)",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                0,
                                1
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Status changed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Staff member activated"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Staff"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Staff not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Staff member not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Invalid action parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid action parameter. Use 0 to activate or 1 to deactivate."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/tbl_property_details": {
            "get": {
                "tags": [
                    "Property"
                ],
                "summary": "Get list of property details",
                "description": "Display a listing of the TblPropertyDetail.\nGET|HEAD /v2/tblPropertyDetails",
                "operationId": "getPropertyDetails",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The page number for pagination.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "total records per page defult is 10",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "property_type[]",
                        "in": "query",
                        "description": "نوع العقار: 1=فيلا، 2=منتجع، 3=استراحة، 4=عمارة، 5=فندق. يمكنك إرسال أكثر من نوع",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    },
                    {
                        "name": "filter[type_id]",
                        "in": "query",
                        "description": "1=معروض, 0=غير معروض",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[resort_id]",
                        "in": "query",
                        "description": "فلتر بحسب المنتجع",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "occasion_type_id[]",
                        "in": "query",
                        "description": "Occasion Type IDs (1=عرس, 2=خطوبة, 3=عقد قران, 4=اسبوع مولود, 5=الإقامة العادية, 6=العيد, 7=تلبيسة)",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3,
                                    4,
                                    5,
                                    6,
                                    7
                                ]
                            }
                        }
                    },
                    {
                        "name": "filter[title]",
                        "in": "query",
                        "description": "title",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "latitude",
                        "in": "query",
                        "description": "latitude",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "longitude",
                        "in": "query",
                        "description": "longitude",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[children_max_age]",
                        "in": "query",
                        "description": "Maximum age of children",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[tbl_city_id]",
                        "in": "query",
                        "description": "city_id",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[tbl_zone_id]",
                        "in": "query",
                        "description": "zone_id",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "filter[children_max_age]",
                        "in": "query",
                        "description": "children_max_age",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "guest_type",
                        "in": "query",
                        "description": "guest_type",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_type",
                        "in": "query",
                        "description": "payment_type",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "cash",
                                "wallet",
                                "wallet_and_cash",
                                "wallet_plus"
                            ]
                        }
                    },
                    {
                        "name": "start_day_price",
                        "in": "query",
                        "description": "Minimum price per day",
                        "required": false,
                        "schema": {
                            "type": "float"
                        }
                    },
                    {
                        "name": "end_day_price",
                        "in": "query",
                        "description": "Maximum price per day",
                        "required": false,
                        "schema": {
                            "type": "float"
                        }
                    },
                    {
                        "name": "price_type_search",
                        "in": "query",
                        "description": "Price type for search (both - week_day_price - weekend_day_price)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "both",
                                "week_day_price",
                                "weekend_day_price"
                            ]
                        }
                    },
                    {
                        "name": "availability_date_start",
                        "in": "query",
                        "description": "availability_date_start",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "availability_date_end",
                        "in": "query",
                        "description": "availability_date_end",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "availability_search_type",
                        "in": "query",
                        "description": "Price type for search (both - week_day_price - weekend_day_price)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "full ",
                                "part"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                }
            }
        },
        "/property-details/{id}": {
            "get": {
                "tags": [
                    "Property"
                ],
                "summary": "Get property by ID",
                "operationId": "46db734f69c141b312482105dffe7102",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "404": {
                        "description": "Property not found"
                    }
                }
            }
        },
        "/add-property": {
            "post": {
                "tags": [
                    "Property"
                ],
                "summary": "Add property",
                "description": "Create a property with prices, units, amenities, facilities and guest types",
                "operationId": "6e02ac669ea263bfb2c2520f68572fd9",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "Detail": {
                                        "required": [
                                            "title",
                                            "property_type"
                                        ],
                                        "properties": {
                                            "title": {
                                                "type": "string",
                                                "example": "فيلا الشاطئ"
                                            },
                                            "property_type": {
                                                "description": "1=Villa, 3=Vacation",
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "parent_id": {
                                                "type": "integer",
                                                "nullable": true
                                            },
                                            "tbl_city_id": {
                                                "type": "integer",
                                                "example": 5
                                            },
                                            "tbl_zone_id": {
                                                "type": "integer",
                                                "example": 12
                                            },
                                            "children_count": {
                                                "type": "integer",
                                                "example": 4
                                            },
                                            "adult_count": {
                                                "type": "integer",
                                                "example": 8
                                            },
                                            "latitude": {
                                                "type": "string",
                                                "example": "32.8872"
                                            },
                                            "longitude": {
                                                "type": "string",
                                                "example": "13.1913"
                                            },
                                            "meter_distance": {
                                                "type": "string",
                                                "example": "200"
                                            },
                                            "type_of_guest": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                }
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "فيلا جميلة جدا"
                                            },
                                            "no_of_chalets": {
                                                "type": "integer",
                                                "example": 2
                                            },
                                            "is_near_see": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "no_of_guest": {
                                                "type": "integer",
                                                "example": 4
                                            },
                                            "type_id": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "check_in_time": {
                                                "type": "string",
                                                "example": "14:00"
                                            },
                                            "check_out_time": {
                                                "type": "string",
                                                "example": "12:00"
                                            },
                                            "tbl_chalet_size_id": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "resort_id": {
                                                "type": "integer",
                                                "example": 1,
                                                "nullable": true
                                            },
                                            "location": {
                                                "type": "string",
                                                "example": "طرابلس"
                                            },
                                            "image_file": {
                                                "description": "الصورة الرئيسية",
                                                "type": "string",
                                                "format": "binary"
                                            },
                                            "file": {
                                                "description": "ملف إضافي أو صورة ثانوية",
                                                "type": "string",
                                                "format": "binary"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "PropertyUnits": {
                                        "properties": {
                                            "total_quantity": {
                                                "type": "integer",
                                                "example": 10
                                            },
                                            "displayed_quantity": {
                                                "type": "integer",
                                                "example": 5
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "PropertyChaletPrice": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "occasion_type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "occasion_price": {
                                                    "type": "number",
                                                    "example": 1500
                                                },
                                                "deposit_occasion_price": {
                                                    "type": "number",
                                                    "example": 300
                                                },
                                                "payment_type": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "deposite_type": {
                                                    "type": "integer",
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "Amenity": {
                                        "properties": {
                                            "category_id": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                },
                                                "example": [
                                                    1,
                                                    2,
                                                    3
                                                ]
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "Facility": {
                                        "properties": {
                                            "category_id": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                },
                                                "example": [
                                                    5,
                                                    6,
                                                    7
                                                ]
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Property added successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Property added successfully"
                                        },
                                        "detail": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation or processing error"
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/edit-property/{id}": {
            "put": {
                "tags": [
                    "Property"
                ],
                "summary": "Edit property details",
                "description": "Update property info, units, amenities, facilities, prices, services and images",
                "operationId": "aa04ba0aa9aa8bc3e0af08f7c2050086",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Property ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 123
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "Detail": {
                                        "properties": {
                                            "title": {
                                                "type": "string",
                                                "example": "فيلا الشاطئ"
                                            },
                                            "property_type": {
                                                "description": "1=Villa, 3=Vacation",
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "parent_id": {
                                                "type": "integer",
                                                "nullable": true
                                            },
                                            "tbl_city_id": {
                                                "type": "integer",
                                                "example": 5
                                            },
                                            "tbl_zone_id": {
                                                "type": "integer",
                                                "example": 12
                                            },
                                            "total_quantity": {
                                                "type": "integer",
                                                "example": 10
                                            },
                                            "displayed_quantity": {
                                                "type": "integer",
                                                "example": 5
                                            },
                                            "children_count": {
                                                "type": "integer",
                                                "example": 4
                                            },
                                            "adult_count": {
                                                "type": "integer",
                                                "example": 8
                                            },
                                            "latitude": {
                                                "type": "string",
                                                "example": "32.8872"
                                            },
                                            "longitude": {
                                                "type": "string",
                                                "example": "13.1913"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "فيلا جميلة جدا"
                                            },
                                            "no_of_chalets": {
                                                "type": "integer",
                                                "example": 2
                                            },
                                            "is_near_see": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "no_of_guest": {
                                                "type": "integer",
                                                "example": 4
                                            },
                                            "type_id": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "check_in_time": {
                                                "type": "string",
                                                "example": "14:00"
                                            },
                                            "check_out_time": {
                                                "type": "string",
                                                "example": "12:00"
                                            },
                                            "tbl_chalet_size_id": {
                                                "type": "integer",
                                                "example": 1
                                            },
                                            "resort_id": {
                                                "type": "integer",
                                                "example": 1,
                                                "nullable": true
                                            },
                                            "location": {
                                                "type": "string",
                                                "example": "طرابلس"
                                            },
                                            "image_file": {
                                                "description": "الصورة الرئيسية",
                                                "type": "string",
                                                "format": "binary"
                                            },
                                            "file": {
                                                "description": "ملف إضافي أو صورة ثانوية",
                                                "type": "string",
                                                "format": "binary"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "Amenity": {
                                        "properties": {
                                            "category_id": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                },
                                                "example": [
                                                    1,
                                                    2,
                                                    3
                                                ]
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "Facility": {
                                        "properties": {
                                            "category_id": {
                                                "type": "array",
                                                "items": {
                                                    "type": "integer"
                                                },
                                                "example": [
                                                    5,
                                                    6,
                                                    7
                                                ]
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "ChaletPrice": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "amount": {
                                                    "type": "number",
                                                    "example": 1500
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "delete_images": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": 55
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Property updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Property updated successfully"
                                        },
                                        "detail": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error"
                    },
                    "404": {
                        "description": "Property not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/property/{id}/images": {
            "post": {
                "tags": [
                    "Property Images"
                ],
                "summary": "Upload gallery images for a property",
                "operationId": "bb75b4bd0072e37d1bf1529054be00c3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Property ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "properties": {
                                    "images[]": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "format": "binary"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Images uploaded successfully"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/property/images/{imageId}": {
            "delete": {
                "tags": [
                    "Property Images"
                ],
                "summary": "Delete a property gallery image",
                "operationId": "c94f0d0fb3c8dda99c882738a1ba128c",
                "parameters": [
                    {
                        "name": "imageId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Image deleted successfully"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/user/signup": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "تسجيل مستخدم جديد",
                "operationId": "770a90d0b495482956afbbb1456eebf3",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "country_code",
                                    "contact_no",
                                    "role_id"
                                ],
                                "properties": {
                                    "country_code": {
                                        "type": "string",
                                        "example": "+218"
                                    },
                                    "contact_no": {
                                        "type": "string",
                                        "example": "912345678"
                                    },
                                    "role_id": {
                                        "description": "2=User, 5=Owner",
                                        "type": "integer",
                                        "example": 2
                                    },
                                    "device_token": {
                                        "type": "string",
                                        "example": "token123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "تم بنجاح"
                    }
                }
            }
        },
        "/user/verify-otp": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "التحقق من رمز OTP",
                "operationId": "cb662d084f7bcea27e6d234c155d1eb8",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "country_code",
                                    "contact_no",
                                    "otp"
                                ],
                                "properties": {
                                    "country_code": {
                                        "type": "string",
                                        "example": "+218"
                                    },
                                    "contact_no": {
                                        "type": "string",
                                        "example": "912345678"
                                    },
                                    "otp": {
                                        "type": "integer",
                                        "example": 1234
                                    },
                                    "device_token": {
                                        "type": "string",
                                        "example": "token123"
                                    },
                                    "device_name": {
                                        "type": "string",
                                        "example": "android"
                                    },
                                    "device_type": {
                                        "type": "string",
                                        "example": "1"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "تم التحقق بنجاح"
                    }
                }
            }
        },
        "/user/profile-setup": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Setup user profile after OTP verification",
                "operationId": "2d21e8fa5f6bcf7327d92f8277b0809f",
                "requestBody": {
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "User[first_name]",
                                    "User[password]",
                                    "User[confirm_password]"
                                ],
                                "properties": {
                                    "User[first_name]": {
                                        "type": "string",
                                        "example": "User"
                                    },
                                    "User[last_name]": {
                                        "type": "string",
                                        "example": "Rajput"
                                    },
                                    "User[email]": {
                                        "type": "string",
                                        "example": "user2@mail.com"
                                    },
                                    "User[address]": {
                                        "type": "string",
                                        "example": "address"
                                    },
                                    "User[latitude]": {
                                        "type": "string",
                                        "example": "43.6532"
                                    },
                                    "User[whtsaap_no]": {
                                        "type": "string",
                                        "example": "1234567890"
                                    },
                                    "User[longitude]": {
                                        "type": "string",
                                        "example": "79.3832"
                                    },
                                    "User[password]": {
                                        "type": "string",
                                        "example": ""
                                    },
                                    "User[confirm_password]": {
                                        "type": "string",
                                        "example": "admin123"
                                    },
                                    "User[id_proof]": {
                                        "type": "file"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "تمت إضافة الملف الشخصي بنجاح."
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/host/payment/type": {
            "get": {
                "tags": [
                    "auth payment type"
                ],
                "summary": "Get the authinticated user payment type",
                "operationId": "getAuthPaymentType",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    },
                    "403": {
                        "description": "login required"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/apartment/transaction/earning": {
            "get": {
                "tags": [
                    "auth transaction earning"
                ],
                "summary": "Get host appartment transaction earning",
                "operationId": "getAuthAppartmentTransactionEarning",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/property/transaction/earning": {
            "get": {
                "tags": [
                    "auth transaction earning"
                ],
                "summary": "Get host property transaction earning",
                "operationId": "getAuthPropertyTransactionEarning",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/transaction": {
            "get": {
                "tags": [
                    "auth transactions"
                ],
                "summary": "Get host transactions",
                "operationId": "getAuthTransactions",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/transaction/earning": {
            "get": {
                "tags": [
                    "auth transaction earning"
                ],
                "summary": "Get host transaction earning",
                "operationId": "getAuthTransactionEarning",
                "responses": {
                    "200": {
                        "description": "successful operation"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/customer/phone-search": {
            "post": {
                "tags": [
                    "Customers"
                ],
                "summary": "Search for a customer by phone number",
                "description": "Checks whether the entered phone number (with country code, default is +218) belongs to a registered and active customer with a verified phone number. If the number belongs to a property owner (role_id = 5), it returns a specific conflict message without exposing user data.",
                "operationId": "phoneSearch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "phone"
                                ],
                                "properties": {
                                    "phone": {
                                        "description": "Phone number without country code",
                                        "type": "string",
                                        "example": "925667675"
                                    },
                                    "country_code": {
                                        "description": "Country code (optional, default is +218)",
                                        "type": "string",
                                        "example": "+218"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Customer found successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "تم العثور على العميل بنجاح."
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "full_name": {
                                                    "type": "string",
                                                    "example": "Mohamed Ali"
                                                },
                                                "email": {
                                                    "type": "string",
                                                    "example": "mohamed@example.com"
                                                },
                                                "contact_no": {
                                                    "type": "string",
                                                    "example": "+218925667675"
                                                },
                                                "whtsaap_no": {
                                                    "type": "string",
                                                    "example": "+218925667675"
                                                },
                                                "address": {
                                                    "type": "string",
                                                    "example": "Tripoli"
                                                },
                                                "city": {
                                                    "type": "string",
                                                    "example": "Tripoli"
                                                },
                                                "country": {
                                                    "type": "string",
                                                    "example": "Libya"
                                                },
                                                "role_id": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "type_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "otp_verify": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "state_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Account is inactive, not verified, or belongs to another role.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "تم العثور على العميل، لكن الحساب غير مفعل أو لم يتم التحقق من رقم الهاتف."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Customer not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "لم يتم العثور على العميل."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The phone number is already registered as a property owner.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "نأسف، هذا الرقم مسجل مسبقاً كصاحب عقار."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation Error.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The phone field is required."
                                        },
                                        "errors": {
                                            "properties": {
                                                "phone": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The phone field is required."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/user/host-stats": {
            "get": {
                "tags": [
                    "المضيفين"
                ],
                "summary": "الحصول على إحصائيات المضيف",
                "description": "يحصل على رصيد المحفظة وعدد الحجوزات للمضيف. يجب أن يكون المستخدم مضيف (role_id = 5)",
                "operationId": "getHostStats",
                "responses": {
                    "200": {
                        "description": "تم الحصول على الإحصائيات بنجاح",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "تم الحصول على الإحصائيات بنجاح"
                                        },
                                        "data": {
                                            "properties": {
                                                "wallet_balance": {
                                                    "description": "رصيد المحفظة",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1500.5
                                                },
                                                "cash_earnings": {
                                                    "description": "أرباح الكاش من الحجوزات المكتملة",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 2500.75
                                                },
                                                "wallet_earnings": {
                                                    "description": "أرباح المحفظة من الحجوزات المكتملة",
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1800.25
                                                },
                                                "completed_bookings": {
                                                    "description": "عدد الحجوزات المكتملة (نوع 5)",
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "confirm_bookings": {
                                                    "description": "عدد الحجوزات المؤكدة (نوع 4)",
                                                    "type": "integer",
                                                    "example": 18
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "غير مسموح - المستخدم ليس مضيف",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "غير مسموح - يجب أن تكون مضيف للوصول لهذه البيانات"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "غير مصرح - يجب تسجيل الدخول",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "يجب تسجيل الدخول للوصول لهذه البيانات"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/login": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Unified Login",
                "description": "Allows login for a property owner (TblUser) via phone number, or a staff member (Staff) via username. Detection is automatic: if username is digits only = TblUser, if it contains letters = Staff.",
                "operationId": "unifiedLogin",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "username",
                                    "password",
                                    "device_token",
                                    "device_name",
                                    "device_type"
                                ],
                                "properties": {
                                    "username": {
                                        "description": "Phone number (for TblUser) or text username (for Staff)",
                                        "type": "string",
                                        "example": "912345678"
                                    },
                                    "password": {
                                        "description": "Account password",
                                        "type": "string",
                                        "format": "password",
                                        "example": "secret123"
                                    },
                                    "country_code": {
                                        "description": "Country code — required only for TblUser phone login (default: 218)",
                                        "type": "string",
                                        "example": "218"
                                    },
                                    "role_id": {
                                        "description": "Role ID — required only for TblUser login (1=Admin, 2=User, 5=Owner)",
                                        "type": "integer",
                                        "example": 5
                                    },
                                    "device_token": {
                                        "description": "FCM device token",
                                        "type": "string",
                                        "example": "fcm_token_abc123"
                                    },
                                    "device_name": {
                                        "description": "Device platform: android / ios",
                                        "type": "string",
                                        "example": "android"
                                    },
                                    "device_type": {
                                        "description": "Device type as a numeric string",
                                        "type": "string",
                                        "example": "1"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Login successful",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "state": {
                                            "description": "0=fully registered, 1=OTP not verified (TblUser only), 2=profile incomplete",
                                            "type": "integer",
                                            "example": 0
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Login successful"
                                        },
                                        "access_token": {
                                            "type": "string",
                                            "example": "abc123..."
                                        },
                                        "role": {
                                            "type": "string",
                                            "example": "CO-Admin"
                                        },
                                        "role_id": {
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "permissions": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Role mismatch or invalid input"
                    },
                    "401": {
                        "description": "Wrong password"
                    },
                    "403": {
                        "description": "Account is deactivated"
                    },
                    "404": {
                        "description": "User not found"
                    },
                    "202": {
                        "description": "OTP verification required or profile incomplete (TblUser only)"
                    }
                }
            }
        },
        "/host/customers/send-otp": {
            "post": {
                "tags": [
                    "Host-Customers"
                ],
                "summary": "Send OTP to a new or unverified customer",
                "description": "Checks if the phone number is already registered. If not, creates a pending customer account and sends an OTP. If exists but not verified, resends OTP.",
                "operationId": "sendHostCustomerOtp",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "phone"
                                ],
                                "properties": {
                                    "phone": {
                                        "type": "string",
                                        "example": "911234567"
                                    },
                                    "country_code": {
                                        "type": "string",
                                        "default": "+218",
                                        "example": "+218"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Pending account created and OTP sent"
                    },
                    "200": {
                        "description": "OTP resent successfully"
                    },
                    "409": {
                        "description": "Phone number already registered as Host or active Customer"
                    },
                    "403": {
                        "description": "Phone number registered with other roles"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/customers/verify-otp": {
            "post": {
                "tags": [
                    "Host-Customers"
                ],
                "summary": "Verify OTP for customer",
                "description": "Verifies the OTP sent to the customer's phone number and returns the user ID upon success.",
                "operationId": "verifyHostCustomerOtp",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "phone",
                                    "otp"
                                ],
                                "properties": {
                                    "phone": {
                                        "type": "string",
                                        "example": "911234567"
                                    },
                                    "country_code": {
                                        "type": "string",
                                        "default": "+218",
                                        "example": "+218"
                                    },
                                    "otp": {
                                        "type": "integer",
                                        "example": 1234
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OTP verified successfully, returns user_id"
                    },
                    "400": {
                        "description": "Invalid OTP"
                    },
                    "404": {
                        "description": "Customer not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        },
        "/host/customers/{id}/profile": {
            "post": {
                "tags": [
                    "Host-Customers"
                ],
                "summary": "Complete customer profile and send WhatsApp link",
                "description": "Updates the customer's profile details and sends a WhatsApp message with the Turista App download link. The customer must have their OTP verified first.",
                "operationId": "updateHostCustomerProfile",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Customer ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "first_name",
                                    "last_name"
                                ],
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "example": "John"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "example": "Doe"
                                    },
                                    "email": {
                                        "type": "string",
                                        "example": "john@example.com"
                                    },
                                    "gender": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "city": {
                                        "type": "string",
                                        "example": "Tripoli"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Profile updated and WhatsApp message sent"
                    },
                    "403": {
                        "description": "Customer OTP not verified yet"
                    },
                    "404": {
                        "description": "Customer not found"
                    }
                },
                "security": [
                    {
                        "sanctum": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "TblBooking": {
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1
                    },
                    "detail_id": {
                        "type": "integer",
                        "example": 10
                    },
                    "start_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2026-03-10"
                    },
                    "end_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2026-03-13"
                    },
                    "start_time": {
                        "type": "string",
                        "format": "time",
                        "example": "14:00:00"
                    },
                    "end_time": {
                        "type": "string",
                        "format": "time",
                        "example": "12:00:00"
                    },
                    "no_of_guest": {
                        "type": "integer",
                        "example": 4
                    },
                    "state_id": {
                        "type": "integer",
                        "example": 1
                    },
                    "total_amount": {
                        "type": "number",
                        "format": "float",
                        "example": 600
                    },
                    "deposite_amount": {
                        "type": "number",
                        "format": "float",
                        "example": 200
                    },
                    "booking_source": {
                        "type": "string",
                        "example": "mobile"
                    },
                    "payment_type": {
                        "type": "string",
                        "example": "wallet"
                    }
                },
                "type": "object"
            },
            "Staff": {
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1
                    },
                    "first_name": {
                        "type": "string",
                        "example": "John"
                    },
                    "last_name": {
                        "type": "string",
                        "example": "Doe"
                    },
                    "username": {
                        "type": "string",
                        "example": "johndoe"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "example": "john@example.com"
                    },
                    "phone_number": {
                        "type": "string",
                        "example": "+1234567890"
                    },
                    "country_code": {
                        "type": "string",
                        "example": "+1"
                    },
                    "role_id": {
                        "description": "Allowed values: 1 (CO-Admin), 2 (Booking), 3 (Finance)",
                        "type": "integer",
                        "example": 1
                    },
                    "is_active": {
                        "type": "boolean",
                        "example": true
                    },
                    "created_on": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_on": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "created_by_id": {
                        "type": "integer",
                        "example": 1
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "sanctum": {
                "type": "apiKey",
                "description": "Enter token in format (Bearer <token>)",
                "name": "Authorization",
                "in": "header"
            }
        }
    },
    "tags": [
        {
            "name": "Home Settings",
            "description": "Manage featured properties on home page (default or per city)"
        },
        {
            "name": "Property",
            "description": "Property Management"
        },
        {
            "name": "amenities",
            "description": "amenities"
        },
        {
            "name": "Availability",
            "description": "Availability"
        },
        {
            "name": "Bookings",
            "description": "Bookings"
        },
        {
            "name": "EzonePay",
            "description": "EzonePay"
        },
        {
            "name": "facilities",
            "description": "facilities"
        },
        {
            "name": "Property Configurations",
            "description": "Property Configurations"
        },
        {
            "name": "Staff",
            "description": "Staff"
        },
        {
            "name": "Property Images",
            "description": "Property Images"
        },
        {
            "name": "Authentication",
            "description": "Authentication"
        },
        {
            "name": "auth payment type",
            "description": "auth payment type"
        },
        {
            "name": "auth transaction earning",
            "description": "auth transaction earning"
        },
        {
            "name": "auth transactions",
            "description": "auth transactions"
        },
        {
            "name": "Customers",
            "description": "Customers"
        },
        {
            "name": "المضيفين",
            "description": "المضيفين"
        },
        {
            "name": "Host-Customers",
            "description": "Host-Customers"
        }
    ],
    "security": [
        {
            "sanctum": []
        }
    ]
}