pricing-library-details:
  get:
    tags: [AI Pricing]
    summary: Pricing library item details
    description: |
      Full details for one pricing request owned by the authenticated user (تفاصيل طلب التسعير).

      - Requires an authenticated **client or provider** bearer token (`ClientBearerAuth` or `ProviderBearerAuth`).
      - Swagger UI exposes a **token switcher** (Client / Provider); only the selected scheme is sent.
      - Query param `id` is the PricingRequest Mongo id.
      - Returns the AI suggested price and range from `@returnObj.pricingRequestItem` (same base fields as create).

      <div class="figma-links"><span>Design:</span><a href="https://www.figma.com/proto/mTRILiWaS8pzLcNnmAUr2k/%D9%83%D9%85-%D8%AA%D8%B3%D9%88%D9%8A?node-id=9985-22794&viewport=176%2C570%2C0.02&t=c4yTtQLlUc9FQir5-1&scaling=scale-down&content-scaling=fixed&starting-point-node-id=9064%3A6087&page-id=0%3A1" target="_blank" rel="noopener">Mobile</a></div>
    x-figma:
      mobile: "https://www.figma.com/proto/mTRILiWaS8pzLcNnmAUr2k/%D9%83%D9%85-%D8%AA%D8%B3%D9%88%D9%8A?node-id=9985-22794&viewport=176%2C570%2C0.02&t=c4yTtQLlUc9FQir5-1&scaling=scale-down&content-scaling=fixed&starting-point-node-id=9064%3A6087&page-id=0%3A1"
      mobileNodeId: "9985:22794"
    operationId: getPricingLibraryDetails
    security:
      - SecretKeyAuth: []
        ClientBearerAuth: []
      - SecretKeyAuth: []
        ProviderBearerAuth: []
    parameters:
      - $ref: '../../openapi.yaml#/components/parameters/LangHeader'
      - name: id
        in: query
        required: true
        schema: { type: string }
        example: "665f1c2a9b4e1d0012ab34b1"
    responses:
      '200':
        description: Pricing request details.
        content:
          application/json:
            schema:
              $ref: '../../openapi.yaml#/components/schemas/PricingRequestDetailsSuccessResponse'
            example:
              key: success
              message: "تفاصيل طلب التسعير"
              status: 200
              data:
                id: "665f1c2a9b4e1d0012ab34b1"
                name: "آيفون 13"
                image: "https://dashboard.kam-teswa.4hoste.com/assets/uploads/users/providers/pricing-requests/665f1c2a9b4e1d0012ab34b1/image901785232499932.png"
                specifications: "اللون أسود - الحالة جديد - الذاكرة 256"
                suggestedPrice: 450
                suggestedPriceTXT: "450 ﷼"
                priceRangeMin: 383
                priceRangeMax: 518
                currency: "﷼"
                createdAt: "2026/07/28 11:00 صباحا"
      '404':
        description: Pricing request not found for this user.
        content:
          application/json:
            schema: { $ref: '../../openapi.yaml#/components/schemas/ErrorResponse' }
            example: { key: notFound, message: "طلب التسعير غير موجود", status: 404 }
      '419':
        description: Unauthorized.
        content:
          application/json:
            schema: { $ref: '../../openapi.yaml#/components/schemas/ErrorResponse' }
            example: { key: unauthorized, message: "يجب تسجيل الدخول", status: 419 }
      '500': { $ref: '#/shared-server-error' }

shared-server-error:
  description: Unexpected server error.
  content:
    application/json:
      schema: { $ref: '../../openapi.yaml#/components/schemas/ErrorResponse' }
      example: { key: exception, message: "حدث خطأ ما", status: 500 }
