{
  "openapi": "3.0.3",
  "info": {
    "title": "Vion Platform BFF API",
    "version": "0.1.0",
    "description": "**中文**\n\n平台跨域只读组合接口（`backend/bff`），仅允许 GET 请求，只组合平台自有数据，不查询指标数值、不解析看板 RDL 内容（R4、R17）。\n\n**English**\n\nCross-domain read-only composition API (backend/bff). Only GET requests are permitted. Compose only platform-owned data without querying metric values or parsing dashboard RDL content (R4, R17)."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "bff",
      "description": "**中文**\n\n跨域只读页面视图组合接口\n\n**English**\n\nCross-domain read-only page view composition API"
    }
  ],
  "x-doc-groups": [
    {
      "id": "session",
      "title": "会话上下文 / Session Context",
      "operations": [
        "getSessionView"
      ]
    },
    {
      "id": "org-unit-site-tree",
      "title": "组织场所组合视图 / Org Unit and Site Composite View",
      "operations": [
        "getOrgUnitSiteTreeView"
      ]
    },
    {
      "id": "dashboard-view",
      "title": "看板组合视图 / Dashboard Composite View",
      "operations": [
        "getDashboardView",
        "getDashboardDirectory"
      ]
    },
    {
      "id": "roi-binding-view",
      "title": "观测区域绑定组合视图 / ROI Binding Composite View",
      "operations": [
        "getRoiBindingView"
      ]
    }
  ],
  "paths": {
    "/api/platform/bff/session": {
      "get": {
        "operationId": "getSessionView",
        "tags": [
          "bff"
        ],
        "summary": "读取当前已认证的工作区会话上下文 / Read the current authenticated shell context",
        "description": "**中文**\n\n只读投影 Access QueryApi 与 Masterdata QueryApi 的数据。普通用户的菜单和功能权限分别由角色授权取并集，并受租户获授范围上限约束。具有有效管理员身份的用户取得当前租户内的 ALL 范围。\n未选择租户时，tenantId 和 siteScope 为 null，租户授权集合为空。tenants 仍包含该用户可用的租户成员关系和权威组织 alias，供 Web 租户选择对话框使用。\n平台入口依据已验证的 platform_super_admin 身份，绝不依据 username。请求头只是请求的目标，绝不作为权限证明。\n本会话视图依据请求内已验证的身份及租户授权，不依赖服务端浏览器会话，也不要求管理员角色或业务功能码。其他 BFF 操作继续遵循已有策略。\n\n**English**\n\nRead-only Access QueryApi and Masterdata QueryApi projection. Normal-user menus and permissions are independent role unions capped by tenant entitlements. Effective administrators get tenant-local ALL. Without a selected tenant the tenantId/siteScope are null and tenant authorization collections are empty; tenants still contains the user's available memberships and authoritative organization aliases for the Web selection dialog. The platform entry is based on verified platform_super_admin, never a username. A header is a requested target, never proof of authority. This session view uses request-scoped verified identity and tenant authorization without a server-side browser session, not an administrator role or business permission code. Other BFF operations retain their existing policies.",
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n请求的租户。校验已认证身份、成员资格、状态及撤销状态。\n\n**English**\n\nRequested tenant; validated against the authenticated identity, membership, status and revocation state."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n请求成功。\n\n**English**\n\nSuccess",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "**中文**\n\n此响应使用 no-store 指令，禁止缓存。\n\n**English**\n\nThis response uses the no-store directive and must not be cached."
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionViewEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "userId": "kc-user-001",
                        "username": "alex",
                        "displayName": "Alex Chen",
                        "platformAdmin": true,
                        "tenantAdmin": false,
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "tenants": [],
                        "next": "tenant",
                        "menuTree": [],
                        "permissionCodes": [],
                        "siteScope": {
                          "scopeType": "ALL",
                          "scopeIds": []
                        },
                        "managementEntries": {
                          "tenantConsole": true,
                          "platformConsole": true
                        }
                      },
                      "message": "OK",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  },
                  "identity": {
                    "value": {
                      "code": 0,
                      "data": {
                        "userId": "kc-user-001",
                        "username": "platform.operator",
                        "displayName": "Alex Chen",
                        "platformAdmin": true,
                        "tenantAdmin": false,
                        "tenantId": null,
                        "tenants": [
                          {
                            "tenantId": "01a2319e-2167-7240-bc32-25eb66ca4ef4",
                            "tenantCode": "retail-a",
                            "organizationAlias": "enterprise-a",
                            "name": "Retail A",
                            "status": "ACTIVE"
                          }
                        ],
                        "next": "platform",
                        "menuTree": [],
                        "permissionCodes": [],
                        "siteScope": null,
                        "managementEntries": {
                          "tenantConsole": true,
                          "platformConsole": true
                        }
                      },
                      "message": "OK",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/platform/bff/org-unit-site-tree": {
      "get": {
        "operationId": "getOrgUnitSiteTreeView",
        "tags": [
          "bff"
        ],
        "summary": "获取组织场所页组合视图 / Read the composite org unit and site tree view",
        "description": "**中文**\n\n组合 Access 的场所范围和主数据组装的组织单元树、各组织单元的直属场所与无所属组织的直属租户场所。含闭店场所。\n\n**English**\n\nCombine the site scope from Access with the org unit tree assembled by Masterdata, including each org unit's direct sites and tenant-direct sites with no owning org unit. Closed sites are included.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n组织单元树与节点场所组合视图\n\n**English**\n\nComposite view of the org unit tree and sites under its nodes",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitSiteTreeViewEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "orgUnits": [
                          {
                            "orgUnitId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                            "parentId": null,
                            "name": "总部",
                            "typeCode": "HEADQUARTERS",
                            "sites": []
                          },
                          {
                            "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                            "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                            "name": "华东大区",
                            "typeCode": "REGION",
                            "sites": [
                              {
                                "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                                "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                                "siteCode": "SH-001",
                                "name": "上海示例店",
                                "siteType": "STORE",
                                "operatingStatus": "OPERATING"
                              }
                            ]
                          }
                        ],
                        "directSites": [
                          {
                            "siteId": "01a2319e-2165-70ab-b75b-605a7196c4c1",
                            "orgUnitId": null,
                            "siteCode": "SH-003",
                            "name": "上海直属示例店",
                            "siteType": "STORE",
                            "operatingStatus": "CLOSED"
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440200"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/platform/bff/dashboards/{dashboardId}/view": {
      "get": {
        "operationId": "getDashboardView",
        "tags": [
          "bff"
        ],
        "summary": "获取看板打开页组合视图 / Read the composite dashboard opening view",
        "description": "**中文**\n\n组合返回看板定义、当前用户可见组织单元树与场所，以及关联空间的平面图纸与货架几何。\nDashboard 提供按请求语言解析标题后的 `rdl`，BFF 原样透传（R17）。`widgets` 合并平台预置（`tenantId = \"0\"`）与当前租户适用于 `dashboard.dashboardType` 的启用部件，平台预置项排在租户项前。\n同一 `widgetCode` 同时存在平台预置和租户项时，按代码引用优先匹配租户项，与数组顺序无关；按 `widgetId` 引用精确匹配各自的定义。\n前端调用 `resolveWidgets(view.dashboard.rdl, view.widgets)` 定位部件，再用 `buildQuery` 构造指标请求。\n\n**English**\n\nCombine the dashboard definition, org unit tree and sites visible to the current user, plus floor plans and shelf geometry for related spaces.\nDashboard provides rdl with titles resolved according to the requested language, and BFF passes it through unchanged (R17). widgets merges enabled platform built-in widgets (tenantId = \"0\") and enabled widgets of the current tenant that apply to dashboard.dashboardType. Platform built-in entries precede tenant entries.\nWhen a widgetCode exists in both platform built-in and tenant entries, a code reference prefers the tenant entry regardless of array order. A widgetId reference matches its exact definition.\nThe frontend invokes resolveWidgets(view.dashboard.rdl, view.widgets) to locate widgets, then uses buildQuery to construct metric requests.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "dashboardId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n待打开的目标看板 ID。\n\n**English**\n\nID of the target dashboard to open."
          },
          {
            "name": "siteId",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n可选指定加载货架与平面几何的场所 ID。\n\n**English**\n\nOptional site ID specifying the site for which to load shelf and plan geometry.",
            "schema": {
              "$ref": "#/components/schemas/UidString"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n看板打开页所需平台数据\n\n**English**\n\nPlatform data required when opening the dashboard",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardViewEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "dashboard": {
                          "dashboardId": "01a2319e-2167-7240-bc32-25e4e1718502",
                          "dashboardCode": "site-overview",
                          "name": "场所客流与货架触达总览",
                          "dashboardType": "SITE_TRAFFIC",
                          "versionNo": 1,
                          "rdl": {
                            "rdlVersion": "1.0",
                            "title": "场所客流与货架触达总览",
                            "filters": {
                              "time": {
                                "granularity": "day"
                              },
                              "scope": {
                                "level": "site"
                              }
                            },
                            "widgets": [
                              {
                                "widgetCode": "site-entrance-traffic",
                                "x": 0,
                                "y": 0,
                                "w": 4,
                                "h": 2
                              }
                            ]
                          },
                          "sourceTemplateId": "01a2319e-2167-7240-bc32-25e5b1bcb674",
                          "sourceVersion": 1,
                          "isDetached": true,
                          "detachedAt": "2026-11-23T09:00:00Z"
                        },
                        "widgets": [
                          {
                            "widgetId": "01a2319e-2167-7240-bc32-25e6264722eb",
                            "tenantId": "0",
                            "widgetCode": "site-entrance-traffic",
                            "name": "场所进入客流",
                            "widgetType": "kpi",
                            "definition": {
                              "metricCode": "entrance_traffic",
                              "dashboardTypeScope": [
                                "SITE_TRAFFIC"
                              ]
                            },
                            "versionNo": 1,
                            "status": 1
                          }
                        ],
                        "visibleOrgUnits": [
                          {
                            "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                            "parentId": null,
                            "name": "华东大区",
                            "typeCode": "REGION"
                          }
                        ],
                        "visibleSites": [
                          {
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                            "siteCode": "SH-001",
                            "name": "上海示例店",
                            "siteType": "STORE",
                            "operatingStatus": "OPERATING"
                          }
                        ],
                        "spaceGeometries": [
                          {
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                            "typeCode": "shelf",
                            "name": "一号货架",
                            "pose": {
                              "x": 12.5,
                              "y": 8,
                              "w": 2.4,
                              "h": 0.8,
                              "rotation": 0
                            },
                            "outlinePolygon": [
                              {
                                "x": 11.3,
                                "y": 7.6
                              },
                              {
                                "x": 13.7,
                                "y": 7.6
                              },
                              {
                                "x": 13.7,
                                "y": 8.4
                              },
                              {
                                "x": 11.3,
                                "y": 8.4
                              }
                            ],
                            "slots": [
                              {
                                "slotId": "01a2319e-2167-7240-bc32-25e9b2c35258",
                                "slotType": "ELEVATION",
                                "slotCode": "H1-A",
                                "name": "A面",
                                "parentSlotId": null
                              }
                            ]
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440201"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/platform/bff/dashboard-directory": {
      "get": {
        "operationId": "getDashboardDirectory",
        "tags": [
          "bff"
        ],
        "summary": "看板查询可见的组织与场所目录 / Get the organization and site directory visible to the dashboard",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n当前租户已授权的目录，包含尚无指标记录的场所。\n\n**English**\n\nDirectory within the authorized scope of the current tenant, including sites without metric records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDirectoryEnvelope"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/platform/bff/sites/{siteId}/roi-binding-view": {
      "get": {
        "operationId": "getRoiBindingView",
        "tags": [
          "bff"
        ],
        "summary": "获取 ROI 绑定页组合视图 / Read the composite ROI binding view",
        "description": "**中文**\n\n组合场所空间与槽位树、当前生效的 ROI 绑定和设备上报同步到本地的 ROI 清单。\n\n**English**\n\nCombine the site space and slot tree, currently effective ROI bindings, and the local ROI inventory synchronized from device reports.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n待配置 ROI 绑定的目标场所 ID。\n\n**English**\n\nID of the target site for ROI binding configuration."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\nROI 绑定页组合视图\n\n**English**\n\nComposite ROI binding page view",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiBindingViewEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "siteName": "上海示例店",
                        "spaces": [
                          {
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "parentId": null,
                            "typeCode": "shelf",
                            "name": "一号货架",
                            "slots": [
                              {
                                "slotId": "01a2319e-2167-7240-bc32-25e9b2c35258",
                                "slotType": "ELEVATION",
                                "slotCode": "H1-A",
                                "name": "A面",
                                "parentSlotId": null
                              }
                            ]
                          }
                        ],
                        "bindings": [
                          {
                            "bindingId": "8001",
                            "roiCode": "R-1001",
                            "targetType": "SPACE_SLOT",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "slotId": "01a2319e-2167-7240-bc32-25e9b2c35258",
                            "directionMode": 1,
                            "metricRole": "DWELL_TOUCH",
                            "validFrom": "2026-11-01T00:00:00Z",
                            "validTo": null,
                            "channelCode": "CH-001"
                          }
                        ],
                        "aiotRois": [
                          {
                            "roiCode": "R-1001",
                            "roiType": "TOUCH",
                            "deviceSerialnum": "CAM-001",
                            "name": "货架 A 面触达规则",
                            "channelCode": "CH-001"
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440202"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "**中文**\n\nKeycloak 签发的 OpenID Connect 访问令牌（Bearer JWT）。\n\n**English**\n\nOpenID Connect access token issued by Keycloak (Bearer JWT)."
      }
    },
    "schemas": {
      "SiteBrief": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "siteId",
          "siteCode",
          "name",
          "siteType",
          "operatingStatus"
        ],
        "properties": {
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "orgUnitId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n场所所属的组织单元 ID，直属租户时为 null。\n\n**English**\n\nOwning org unit ID of the site, or null if the site belongs directly to the tenant."
          },
          "siteCode": {
            "type": "string",
            "description": "**中文**\n\n租户内的场所业务编码。\n\n**English**\n\nBusiness code of the site within the tenant."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n场所的展示名称。\n\n**English**\n\nDisplay name of the site."
          },
          "siteType": {
            "type": "string",
            "enum": [
              "STORE",
              "MALL",
              "MUSEUM",
              "AIRPORT"
            ],
            "description": "**中文**\n\n经营场所类型：STORE 门店、MALL 商场、MUSEUM 博物馆、AIRPORT 机场。\n\n**English**\n\nSite type: STORE for store, MALL for shopping mall, MUSEUM for museum, and AIRPORT for airport."
          },
          "operatingStatus": {
            "$ref": "#/components/schemas/OperatingStatus"
          }
        }
      },
      "OrgUnitBrief": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "orgUnitId",
          "name",
          "typeCode"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，根节点为 null。\n\n**English**\n\nParent org unit ID, or null for a root node."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n组织单元的展示名称。\n\n**English**\n\nDisplay name of the org unit."
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码。\n\n**English**\n\nOrg unit type code."
          }
        }
      },
      "OrgUnitSiteNode": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "orgUnitId",
          "name",
          "typeCode",
          "sites"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，根节点为 null。\n\n**English**\n\nParent org unit ID, or null for a root node."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n组织单元的展示名称。\n\n**English**\n\nDisplay name of the org unit."
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码。\n\n**English**\n\nOrg unit type code."
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteBrief"
            },
            "description": "**中文**\n\n直接归属该组织单元的场所列表。\n\n**English**\n\nList of sites directly assigned to this org unit."
          }
        }
      },
      "OrgUnitSiteTreeView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tenantId",
          "orgUnits",
          "directSites"
        ],
        "properties": {
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "orgUnits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgUnitSiteNode"
            },
            "description": "**中文**\n\n组织单元列表，通过 parentId 表达层级。\n\n**English**\n\nList of org units with the hierarchy represented by parentId."
          },
          "directSites": {
            "type": "array",
            "description": "**中文**\n\n无所属组织单元的直属租户场所；仍受当前用户数据范围约束。\n\n**English**\n\nSites belonging directly to the tenant without an owning org unit, still subject to the current user's data scope.",
            "items": {
              "$ref": "#/components/schemas/SiteBrief"
            }
          }
        }
      },
      "OrgUnitSiteTreeViewEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/OrgUnitSiteTreeView"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SlotBrief": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slotId",
          "slotType",
          "slotCode"
        ],
        "properties": {
          "slotId": {
            "$ref": "#/components/schemas/UidString"
          },
          "slotType": {
            "type": "string",
            "enum": [
              "ELEVATION",
              "TIER",
              "CELL",
              "BAY",
              "STATION",
              "SCREEN"
            ],
            "description": "**中文**\n\n空间槽位类型：ELEVATION 立面、TIER 层、CELL 格位、BAY 节、STATION 工位、SCREEN 互动屏。\n\n**English**\n\nSpace slot type: ELEVATION for elevation, TIER for tier, CELL for cell, BAY for bay, STATION for station, and SCREEN for interactive screen."
          },
          "slotCode": {
            "type": "string",
            "description": "**中文**\n\n空间内槽位的业务编码。\n\n**English**\n\nBusiness code of the slot within the space."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n槽位的展示名称。\n\n**English**\n\nDisplay name of the slot."
          },
          "parentSlotId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父槽位 ID，根槽位为 null。\n\n**English**\n\nParent slot ID, or null for a root slot."
          }
        }
      },
      "SpaceGeometry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "siteId",
          "typeCode",
          "name",
          "slots"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "planId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n空间布局所关联的平面图纸 ID。\n\n**English**\n\nID of the floor plan associated with the space layout."
          },
          "typeCode": {
            "type": "string",
            "description": "**中文**\n\n空间类型编码。\n\n**English**\n\nSpace type code."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n空间的展示名称。\n\n**English**\n\nDisplay name of the space."
          },
          "pose": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n空间在平面图上的摆放参数，包括中心点、朝向和绘制尺寸。位置与尺寸使用米制坐标。\n\n**English**\n\nPlacement parameters of the space on the plan, including center, orientation, and drawing dimensions. Positions and dimensions are expressed in meters."
          },
          "outlinePolygon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point"
            },
            "nullable": true,
            "minItems": 3,
            "description": "**中文**\n\n米制多边形顶点，null 表示未设置。\n\n**English**\n\nPolygon vertices in meters. null indicates that no polygon is set."
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlotBrief"
            },
            "description": "**中文**\n\n该空间包含的槽位列表。\n\n**English**\n\nList of slots contained within the space."
          }
        }
      },
      "DashboardPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dashboardId",
          "dashboardCode",
          "name",
          "dashboardType",
          "versionNo",
          "rdl"
        ],
        "properties": {
          "dashboardId": {
            "$ref": "#/components/schemas/UidString"
          },
          "dashboardCode": {
            "type": "string",
            "description": "**中文**\n\n看板的业务编码。\n\n**English**\n\nBusiness code of the dashboard."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n看板的展示名称。\n\n**English**\n\nDisplay name of the dashboard."
          },
          "dashboardType": {
            "$ref": "#/components/schemas/DashboardType"
          },
          "versionNo": {
            "type": "integer",
            "description": "**中文**\n\n当前看板定义的修订版本号。\n\n**English**\n\nRevision number of the current dashboard definition."
          },
          "rdl": {
            "type": "object",
            "additionalProperties": true,
            "description": "**中文**\n\n页面的元信息、全局筛选配置与部件栅格布局，按 rdl.schema.json#/$defs/DisplayRdl 校验。标题已按请求语言解析且不含 titleI18n。BFF 原样透传（R17）。\n\n**English**\n\nPage metadata, global filter configuration, and widget grid layout, validated against rdl.schema.json#/$defs/DisplayRdl. Titles have already been resolved for the requested language and omit titleI18n. BFF passes the RDL through unchanged (R17)."
          },
          "sourceTemplateId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UidString"
              }
            ],
            "description": "**中文**\n\n来源全局模板的不可变 uid。没有来源模板时为字符串 \"0\"。\n\n**English**\n\nImmutable UID of the source global template. The string \"0\" indicates no source template."
          },
          "sourceVersion": {
            "type": "integer",
            "minimum": 0,
            "description": "**中文**\n\n首次脱离时的全局模板版本。没有来源模板时为 0。\n\n**English**\n\nGlobal template version at the first detachment. Use 0 when there is no source template."
          },
          "isDetached": {
            "type": "boolean",
            "description": "**中文**\n\n当前行是否为租户脱离后的独立副本。\n\n**English**\n\nWhether the current record is the independent copy created when the tenant detached."
          },
          "detachedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "**中文**\n\n首次脱离发生的时间。\n\n**English**\n\nTime when the first detachment occurred."
          }
        }
      },
      "DashboardDirectory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "visibleOrgUnits",
          "visibleSites"
        ],
        "properties": {
          "visibleOrgUnits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgUnitBrief"
            }
          },
          "visibleSites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteBrief"
            }
          }
        }
      },
      "DashboardDirectoryEnvelope": {
        "type": "object",
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/DashboardDirectory"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DashboardView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dashboard",
          "widgets",
          "visibleOrgUnits",
          "visibleSites",
          "spaceGeometries"
        ],
        "properties": {
          "dashboard": {
            "$ref": "#/components/schemas/DashboardPayload"
          },
          "widgets": {
            "type": "array",
            "description": "**中文**\n\n合并平台预置（`tenantId = \"0\"`）与当前租户适用于 `dashboard.dashboardType` 的启用部件，平台预置项排在租户项前。\n同一 `widgetCode` 同时存在平台预置和租户项时，按代码引用优先匹配租户项，与数组顺序无关；按 `widgetId` 引用精确匹配各自的定义。BFF 不解析 `rdl`（R17）。\n\n**English**\n\nMerge enabled widgets from both the platform built-in set (tenantId = \"0\") and the current tenant, limited in both cases to widgets applicable to dashboard.dashboardType. Platform built-in entries precede tenant entries.\nWhen a widgetCode exists in both platform built-in and tenant entries, a code reference prefers the tenant entry regardless of array order. A widgetId reference matches its exact definition. BFF does not parse rdl (R17).",
            "items": {
              "$ref": "#/components/schemas/AnalyticsWidget"
            }
          },
          "visibleOrgUnits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgUnitBrief"
            },
            "description": "**中文**\n\n当前用户可见的组织单元列表。\n\n**English**\n\nList of org units visible to the current user."
          },
          "visibleSites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteBrief"
            },
            "description": "**中文**\n\n当前用户可见的经营场所列表。\n\n**English**\n\nList of sites visible to the current user."
          },
          "spaceGeometries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceGeometry"
            },
            "description": "**中文**\n\n看板所需的空间与货架几何数据。\n\n**English**\n\nSpace and shelf geometry data required by the dashboard."
          }
        }
      },
      "DashboardViewEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/DashboardView"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SpaceSlotTreeItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "typeCode",
          "name",
          "slots"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父空间 ID，直属场所的根空间为 null。\n\n**English**\n\nParent space ID, or null for a root space directly under the site."
          },
          "typeCode": {
            "type": "string",
            "description": "**中文**\n\n空间类型编码。\n\n**English**\n\nSpace type code."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n空间的展示名称。\n\n**English**\n\nDisplay name of the space."
          },
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlotBrief"
            },
            "description": "**中文**\n\n该空间包含的槽位列表。\n\n**English**\n\nList of slots contained within the space."
          }
        }
      },
      "RoiBindingSummary": {
        "type": "object",
        "additionalProperties": false,
        "description": "**中文**\n\nSITE 使用 spaceId 为字符串 \"0\"；SPACE 和 SPACE_SLOT 使用对应空间及槽位的 UID。\n\n**English**\n\nSITE uses the string \"0\" for spaceId; SPACE and SPACE_SLOT use the UIDs of the corresponding space and slot.",
        "required": [
          "bindingId",
          "roiCode",
          "targetType",
          "spaceId",
          "directionMode",
          "metricRole",
          "validFrom",
          "channelCode"
        ],
        "properties": {
          "bindingId": {
            "$ref": "#/components/schemas/IdString"
          },
          "roiCode": {
            "type": "string",
            "description": "**中文**\n\n视频画面中的 ROI 编码，与 channelCode 共同定位观测区域。\n\n**English**\n\nROI code within a video channel, identifying the region of interest together with channelCode."
          },
          "targetType": {
            "type": "string",
            "enum": [
              "SITE",
              "SPACE",
              "SPACE_SLOT"
            ],
            "description": "**中文**\n\n绑定目标层级：SITE 整场、SPACE 空间、SPACE_SLOT 空间槽位。\n\n**English**\n\nBinding target level: SITE for the whole site, SPACE for a space, and SPACE_SLOT for a space slot."
          },
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "slotId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\nSPACE_SLOT 绑定的目标槽位 ID，其他目标层级不使用槽位 ID。\n\n**English**\n\nTarget slot ID for SPACE_SLOT bindings. Other target levels do not use a slot ID."
          },
          "directionMode": {
            "type": "integer",
            "enum": [
              1,
              -1
            ],
            "description": "**中文**\n\n进出方向计数方式，1 沿用设备方向，-1 对调进入与离开。\n\n**English**\n\nDirection counting mode. 1 retains the device direction and -1 swaps entry and exit."
          },
          "metricRole": {
            "type": "string",
            "enum": [
              "ENTRY_EXIT",
              "PASS_BY",
              "DWELL_TOUCH",
              "QUEUE"
            ],
            "description": "**中文**\n\n统计用途：ENTRY_EXIT 进出客流，PASS_BY 场所或区域外围路过客流，DWELL_TOUCH 驻留、热力、关注与触达，QUEUE 排队与收银服务。\n\n**English**\n\nStatistical role: ENTRY_EXIT for entry and exit traffic, PASS_BY for traffic passing a site or area perimeter, DWELL_TOUCH for dwell, heatmaps, attention, and touch, and QUEUE for queuing and checkout service."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "**中文**\n\n绑定的生效起始时刻，包含该时刻。\n\n**English**\n\nInclusive start instant of the binding's validity."
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "**中文**\n\n绑定的失效时刻，不包含该时刻。null 表示开放的有效区间。\n\n**English**\n\nExclusive end instant of the binding's validity. null represents an open-ended interval."
          },
          "channelCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n设备上报的视频画面通道编码。\n\n**English**\n\nDevice-reported video channel code."
          }
        }
      },
      "AiotRoiSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "roiCode",
          "roiType",
          "deviceSerialnum",
          "channelCode",
          "name"
        ],
        "properties": {
          "roiCode": {
            "type": "string",
            "description": "**中文**\n\n视频画面中的 ROI 编码，与 channelCode 共同定位观测区域。\n\n**English**\n\nROI code within a video channel, identifying the region of interest together with channelCode."
          },
          "roiType": {
            "type": "string",
            "description": "**中文**\n\n观测区域类型编码。\n\n**English**\n\nType code of the region of interest."
          },
          "deviceSerialnum": {
            "type": "string",
            "description": "**中文**\n\n上报观测区域的设备序列号。\n\n**English**\n\nSerial number of the device reporting the ROI."
          },
          "channelCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n设备上报的视频画面通道编码。\n\n**English**\n\nDevice-reported video channel code."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n设备上报同步的观测区域名称。\n\n**English**\n\nName of the ROI synchronized from the device report."
          }
        }
      },
      "RoiBindingView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "siteId",
          "siteName",
          "spaces",
          "bindings",
          "aiotRois"
        ],
        "properties": {
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteName": {
            "type": "string",
            "description": "**中文**\n\n目标场所的展示名称。\n\n**English**\n\nDisplay name of the target site."
          },
          "spaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceSlotTreeItem"
            },
            "description": "**中文**\n\n场所内用于 ROI 绑定选择的空间及槽位列表。\n\n**English**\n\nList of spaces and slots in the site used for ROI binding selection."
          },
          "bindings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoiBindingSummary"
            },
            "description": "**中文**\n\n场所当前生效的 ROI 绑定。\n\n**English**\n\nCurrently effective ROI bindings for the site."
          },
          "aiotRois": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiotRoiSummary"
            },
            "description": "**中文**\n\n设备上报后已同步到本地的 ROI 清单。\n\n**English**\n\nROI inventory synchronized locally after device reports."
          }
        }
      },
      "RoiBindingViewEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/RoiBindingView"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SessionMenuNode": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "menuUid",
          "parentMenuUid",
          "menuCode",
          "name",
          "menuType",
          "routePath",
          "routeType",
          "sortOrder",
          "status",
          "children"
        ],
        "properties": {
          "menuUid": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "description": "**中文**\n\n菜单节点的 UID。\n\n**English**\n\nUID of the menu node."
          },
          "parentMenuUid": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "nullable": true,
            "description": "**中文**\n\n父菜单节点的 UID，根节点为 null。\n\n**English**\n\nUID of the parent menu node, or null for a root node."
          },
          "menuCode": {
            "type": "string",
            "description": "**中文**\n\n菜单节点的稳定业务编码。\n\n**English**\n\nStable business code of the menu node."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n依据 Accept-Language 解析显示名称，缺译时回退基础名称。\n\n**English**\n\nDisplay name resolved from Accept-Language, falling back to the base name."
          },
          "menuType": {
            "type": "string",
            "enum": [
              "APP",
              "DIRECTORY",
              "PAGE"
            ],
            "description": "**中文**\n\n菜单节点类型：应用 APP、目录 DIRECTORY、页面 PAGE。\n\n**English**\n\nMenu node type: APP for application, DIRECTORY for directory, and PAGE for page."
          },
          "routePath": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n菜单指向的路由地址，无对应路由时为 null。\n\n**English**\n\nRoute addressed by the menu, or null when no route is associated."
          },
          "routeType": {
            "type": "string",
            "enum": [
              "INTERNAL",
              "EXTERNAL"
            ],
            "description": "**中文**\n\n路由类型，INTERNAL 为内部路由，EXTERNAL 为外部链接。\n\n**English**\n\nRoute type. INTERNAL denotes an internal route and EXTERNAL an external link."
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0,
            "description": "**中文**\n\n同级菜单节点的展示排序号。\n\n**English**\n\nDisplay order among sibling menu nodes."
          },
          "status": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionMenuNode"
            },
            "description": "**中文**\n\n该菜单节点的直接子节点列表。\n\n**English**\n\nList of direct child menu nodes."
          }
        }
      },
      "SessionSiteScope": {
        "type": "object",
        "nullable": true,
        "additionalProperties": false,
        "required": [
          "scopeType",
          "scopeIds"
        ],
        "properties": {
          "scopeType": {
            "type": "string",
            "enum": [
              "ALL",
              "ORG_UNIT",
              "SITE"
            ],
            "description": "**中文**\n\n有效场所范围层级：ALL 为本租户所有场所，ORG_UNIT 为指定组织单元及其下辖场所，SITE 为直接授予的场所。\n\n**English**\n\nEffective site scope level. ALL covers all sites of the tenant, ORG_UNIT covers specified org units and their subordinate sites, and SITE covers directly granted sites."
          },
          "scopeIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UidString"
            },
            "uniqueItems": true,
            "description": "**中文**\n\n有效范围的直接授权节点 ID 集合，不展开下辖场所。ALL 时为空数组。\n\n**English**\n\nIDs of directly granted nodes in the effective scope, without expanding subordinate sites. Empty for ALL."
          }
        }
      },
      "SessionTenant": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tenantId",
          "tenantCode",
          "name",
          "organizationAlias",
          "status"
        ],
        "properties": {
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantCode": {
            "type": "string",
            "description": "**中文**\n\n租户的稳定业务编码。\n\n**English**\n\nStable business code of the tenant."
          },
          "organizationAlias": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\S+$",
            "description": "**中文**\n\n通过组织 ID 解析的权威 Keycloak Organization alias，绝不根据 tenantCode 或 tenantId 推断。\n\n**English**\n\nAuthoritative Keycloak Organization alias resolved through its ID; never inferred from tenantCode or tenantId."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n依据 Accept-Language 解析显示名称，缺译时回退基础名称。\n\n**English**\n\nDisplay name resolved from Accept-Language, falling back to the base name."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DISABLED"
            ],
            "description": "**中文**\n\n租户生命周期状态：PENDING 为待开通，ACTIVE 为启用，DISABLED 为停用。\n\n**English**\n\nTenant lifecycle status. PENDING means pending provisioning, ACTIVE means enabled, and DISABLED means disabled."
          },
          "defaultTimezone": {
            "type": "string",
            "description": "**中文**\n\n租户默认 IANA 时区。\n\n**English**\n\nDefault IANA time zone of the tenant."
          },
          "firstDayOfWeek": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7,
            "description": "**中文**\n\n周统计起始日，1 至 7 依次代表周一至周日。\n\n**English**\n\nFirst day of the reporting week, with values 1 through 7 representing Monday through Sunday."
          },
          "expireDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "**中文**\n\n租户有效期截止的当地日期，按租户默认时区计算且包含当日。null 表示未设置截止日期。\n\n**English**\n\nLast local date of tenant validity, inclusive in the tenant's default time zone. null means no expiration date is configured."
          },
          "remark": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n租户备注信息。\n\n**English**\n\nTenant remarks."
          }
        }
      },
      "SessionView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "userId",
          "username",
          "displayName",
          "platformAdmin",
          "tenantAdmin",
          "tenantId",
          "tenants",
          "next",
          "menuTree",
          "permissionCodes",
          "siteScope",
          "managementEntries"
        ],
        "properties": {
          "userId": {
            "$ref": "#/components/schemas/IdString"
          },
          "username": {
            "type": "string",
            "description": "**中文**\n\n当前已认证用户在身份源中的全局用户名。\n\n**English**\n\nGlobal username of the authenticated user in the identity source."
          },
          "displayName": {
            "type": "string",
            "description": "**中文**\n\n当前已认证用户的显示名称。\n\n**English**\n\nDisplay name of the authenticated user."
          },
          "platformAdmin": {
            "type": "boolean",
            "description": "**中文**\n\n当前用户是否具有已验证的平台管理员身份。\n\n**English**\n\nWhether the current user has verified platform administrator identity."
          },
          "tenantAdmin": {
            "type": "boolean",
            "description": "**中文**\n\n当前用户是否具有当前租户的租户管理员身份。\n\n**English**\n\nWhether the current user has tenant administrator identity in the current tenant."
          },
          "tenantId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n经服务端验证的当前租户 ID，未选择租户时为 null。\n\n**English**\n\nServer-verified current tenant ID, or null when no tenant is selected."
          },
          "tenants": {
            "description": "**中文**\n\n用户实际具有成员资格的可用业务租户，包括平台管理员。平台管理的目标租户从独立的管理租户目录读取。\n\n**English**\n\nAvailable business tenants the user actually belongs to, including for platform administrators. Platform management targets are read from the separate administrative tenant directory.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionTenant"
            }
          },
          "next": {
            "type": "string",
            "enum": [
              "tenant",
              "platform",
              "empty"
            ],
            "description": "**中文**\n\n引导下一步入口：已有当前租户为 tenant，无当前租户的平台管理员为 platform，其余为 empty。\n\n**English**\n\nNext entry selection: tenant when a tenant is selected, platform for a platform administrator without a selected tenant, or empty otherwise."
          },
          "menuTree": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionMenuNode"
            },
            "description": "**中文**\n\n当前用户在租户授权上限内的有效导航树。\n\n**English**\n\nCurrent user's effective navigation tree within the tenant entitlement ceiling."
          },
          "permissionCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "description": "**中文**\n\n当前用户在租户授权上限内的有效功能权限码集合，独立于菜单可见性。\n\n**English**\n\nCurrent user's effective permission codes within the tenant entitlement ceiling, independent of menu visibility."
          },
          "siteScope": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SessionSiteScope"
              }
            ],
            "nullable": true,
            "description": "**中文**\n\n当前用户的有效场所范围。无授权或未选租户时为 null，不能视为 ALL。\n\n**English**\n\nCurrent user's effective site scope. null when no scope is authorized or no tenant is selected and must not be treated as ALL."
          },
          "managementEntries": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "tenantConsole",
              "platformConsole"
            ],
            "properties": {
              "tenantConsole": {
                "type": "boolean",
                "description": "**中文**\n\n是否显示租户后台入口，平台管理员或当前租户管理员为 true。\n\n**English**\n\nWhether to show the tenant administration entry, true for platform administrators or administrators of the current tenant."
              },
              "platformConsole": {
                "type": "boolean",
                "description": "**中文**\n\n是否显示平台管理入口，仅已验证的平台管理员为 true。\n\n**English**\n\nWhether to show the platform administration entry, true only for verified platform administrators."
              }
            },
            "description": "**中文**\n\n根据已验证管理员身份返回的管理入口可见标记。\n\n**English**\n\nManagement entry visibility flags derived from verified administrator identity."
          }
        }
      },
      "SessionViewEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SessionView"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "UidString": {
        "type": "string",
        "minLength": 1,
        "maxLength": 36,
        "description": "**中文**\n\n双键实体的不可变外部标识 uid。新建实体使用 UUIDv7，6.0 迁移沿用非空、合法且唯一的源 unid。\nAPI 字段名及 X-Tenant-Id 请求头保持现有名称。纯数字值不得回退解析为内部自增 id。\n仅在字段明确约定时允许字符串 \"0\" 作为预置或无关联哨兵。\n\n**English**\n\nImmutable external UID of a dual-key entity. New entities use UUIDv7. Migration from 6.0 retains nonempty, valid and unique source UNIDs.\nAPI field names and the X-Tenant-Id request header retain their existing names. Purely numeric values must not fall back to parsing as internal auto-increment IDs.\nThe string \"0\" is permitted as a built-in or unassociated sentinel only where the field explicitly defines it."
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "minimum": 1,
            "description": "**中文**\n\n稳定非零业务错误码，与 HTTP 错误状态共同表达失败。\n\n**English**\n\nStable nonzero business error code. It represents failure together with the HTTP error status."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "maxProperties": 0,
            "description": "**中文**\n\n失败响应固定为 `null`。\n\n**English**\n\nAlways null in failure responses."
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的英文错误描述，不包含内部 SQL、凭据或隐藏对象详情。\n\n**English**\n\nEnglish error description for callers and troubleshooting, excluding internal SQL, credentials, and details of hidden objects."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n与响应头 `X-Request-Id` 相同，用于日志定位。\n\n**English**\n\nMatches X-Request-Id in the response header and is used to locate log entries."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n`40002` 必须返回 `UNSUPPORTED_*` 或 `TARGET_*` 错误子码。\n`40301` 可以附带 `SCOPE_NOT_AUTHORIZED`。\n`40901` 可附带租户启用失败或组织关联冲突的错误子码。\n其余错误可省略此字段或返回 `null`。\n\n**English**\n\n40002 must return a UNSUPPORTED_* or TARGET_* error subcode.\n40301 may include SCOPE_NOT_AUTHORIZED.\n40901 may include an error subcode for tenant enablement failure or organization association conflict.\nOther errors may omit this field or return null.",
            "enum": [
              "UNSUPPORTED_ROLLUP_ORG",
              "UNSUPPORTED_ROLLUP_SPACE",
              "UNSUPPORTED_ROLLUP_TIME",
              "TARGET_DIMENSION_MISSING",
              "TARGET_SCOPE_CONFLICT",
              "UNSUPPORTED_SPACE_TYPE",
              "UNSUPPORTED_SLOT_TYPE",
              "UNSUPPORTED_GRANULARITY",
              "UNSUPPORTED_DIMENSION",
              "UNSUPPORTED_FILTER_OPERATOR",
              "SCOPE_NOT_AUTHORIZED",
              "INVALID_TOKEN",
              "INVALID_REQUEST",
              "ORGANIZATION_REQUIRED",
              "TENANT_ACCESS_DENIED",
              "ACCESS_DENIED",
              "ADMIN_GROUP_CONFLICT",
              "IDENTITY_UNAVAILABLE",
              "IDENTITY_REQUEST_FAILED",
              "MEMBERSHIP_UPDATE_INCOMPLETE",
              "TENANT_EXPIRED",
              "TENANT_NOT_PROVISIONED",
              "ORGANIZATION_CONFLICT",
              null,
              "IDENTITY_CREATE_UNCONFIRMED",
              "USER_CREATE_INCOMPLETE",
              "USER_CREATE_FAILED",
              "TENANT_PROVISIONING_INCOMPLETE",
              "TENANT_PROVISIONING_UNCONFIRMED",
              "ORGANIZATION_DISABLED"
            ]
          },
          "params": {
            "type": "object",
            "description": "**中文**\n\n由错误标识对应的契约定义的文案插值参数，仅供文案插值，不得包含敏感数据。\n\n**English**\n\nMessage interpolation parameters as defined by the contract for the error identifier, used only for interpolation. They must not contain sensitive data.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ErrorParamValue"
            }
          }
        }
      },
      "ErrorParamValue": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          }
        ],
        "description": "**中文**\n\n错误文案插值参数的值，支持字符串或数值。\n\n**English**\n\nError message interpolation parameter value, either a string or a number."
      },
      "NullableUidString": {
        "type": "string",
        "nullable": true,
        "description": "**中文**\n\n可以为 null 的 UidString，用于可空的双键实体关联。\n\n**English**\n\nA UidString that may be null, used for nullable relationships between dual-key entities.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/UidString"
          },
          {
            "type": "string",
            "nullable": true,
            "enum": [
              null
            ]
          }
        ]
      },
      "OperatingStatus": {
        "type": "string",
        "description": "**中文**\n\n场所经营状态，对应内部值 2=PRE_OPENING，1=OPERATING，0=CLOSED。闭店记录仍可查询。\n\n**English**\n\nSite operating status, corresponding to internal values 2=PRE_OPENING, 1=OPERATING and 0=CLOSED. Closed records remain queryable.",
        "enum": [
          "PRE_OPENING",
          "OPERATING",
          "CLOSED"
        ]
      },
      "Point": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "x",
          "y"
        ],
        "properties": {
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "DashboardType": {
        "type": "string",
        "description": "**中文**\n\n看板业务页型。SITE_TRAFFIC 对应场所客流看板，ORG_UNIT_TRAFFIC 对应组织客流看板。\n\n**English**\n\nDashboard business type. SITE_TRAFFIC is a site traffic dashboard and ORG_UNIT_TRAFFIC is an org unit traffic dashboard.",
        "enum": [
          "SITE_TRAFFIC",
          "ORG_UNIT_TRAFFIC"
        ]
      },
      "AnalyticsWidget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "widgetId",
          "tenantId",
          "widgetCode",
          "name",
          "widgetType",
          "definition",
          "versionNo",
          "status"
        ],
        "properties": {
          "widgetId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "description": "**中文**\n\n租户隔离键。\"0\" 表示平台预置部件。\n\n**English**\n\nTenant isolation key. \"0\" denotes a platform built-in widget.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UidString"
              }
            ]
          },
          "widgetCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n分析部件的业务编码，按编码引用时租户项可覆盖平台预置项。\n\n**English**\n\nBusiness code of the analytics widget. Tenant entries can override platform built-in entries for code references."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n分析部件名称。\n\n**English**\n\nName of the analytics widget."
          },
          "widgetType": {
            "type": "string",
            "description": "**中文**\n\n决定部件展示类型的键，例如 kpi。\n\n**English**\n\nKey identifying the widget's presentation type, such as kpi."
          },
          "definition": {
            "$ref": "#/components/schemas/AnalyticsWidgetDefinition"
          },
          "versionNo": {
            "type": "integer",
            "description": "**中文**\n\n当前定义的修订版本号。\n\n**English**\n\nRevision number of the current definition."
          },
          "status": {
            "type": "integer",
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          }
        }
      },
      "AnalyticsWidgetDefinition": {
        "type": "object",
        "additionalProperties": true,
        "x-class-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY)",
        "required": [
          "metricCode"
        ],
        "properties": {
          "metricCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n分析部件绑定的单一指标编码，引用已发布的指标目录。\n\n**English**\n\nCode of the single metric bound to the analytics widget, referencing the published metric catalog."
          },
          "timeGrain": {
            "type": "string",
            "enum": [
              "total",
              "10min",
              "hour",
              "day",
              "week",
              "month"
            ]
          },
          "visualization": {
            "type": "object",
            "additionalProperties": true
          },
          "additionalMetrics": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "inputs": {
            "$ref": "#/components/schemas/WidgetInputs"
          },
          "comparison": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "mode": {
                "type": "string"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "week",
                  "month",
                  "year"
                ]
              },
              "extent": {
                "type": "string",
                "enum": [
                  "elapsed",
                  "full"
                ]
              },
              "inputs": {
                "$ref": "#/components/schemas/WidgetInputs"
              }
            }
          },
          "grouping": {
            "type": "string",
            "enum": [
              "organization"
            ]
          },
          "calculation": {
            "type": "string",
            "enum": [
              "perAuthorizedSite"
            ]
          },
          "resultOrder": {
            "$ref": "#/components/schemas/WidgetResultOrder"
          },
          "target": {
            "$ref": "#/components/schemas/SubjectTarget"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Names"
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "order": {
            "$ref": "#/components/schemas/QueryOrder"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "**中文**\n\n部件查询的最大结果行数。\n\n**English**\n\nMaximum number of result rows for the widget query."
          },
          "dashboardTypeScope": {
            "description": "**中文**\n\n适用的看板页型。省略时适用于所有页型。\n\n**English**\n\nApplicable dashboard types. If omitted, the widget applies to all dashboard types.",
            "type": "array",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/DashboardType"
            }
          }
        }
      },
      "WidgetInputs": {
        "type": "object",
        "x-class-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/WidgetScopeInput"
          },
          "dateRange": {
            "$ref": "#/components/schemas/WidgetDateInput"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WidgetDimensionInput"
            }
          }
        }
      },
      "WidgetScopeInput": {
        "type": "object",
        "x-class-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "page",
              "local",
              "fixed"
            ]
          },
          "level": {
            "type": "string",
            "enum": [
              "site",
              "orgUnit"
            ]
          },
          "ids": {
            "$ref": "#/components/schemas/Names"
          }
        }
      },
      "Names": {
        "type": "array",
        "uniqueItems": true,
        "items": {
          "type": "string",
          "minLength": 1
        },
        "description": "**中文**\n\n去重的非空名称或编码列表。\n\n**English**\n\nUnique list of non-empty names or codes."
      },
      "WidgetDateInput": {
        "type": "object",
        "x-class-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "page",
              "local",
              "fixed"
            ]
          },
          "preset": {
            "type": "string",
            "enum": [
              "today",
              "yesterday",
              "last7Days",
              "last30Days",
              "last7CompleteDays",
              "last30CompleteDays",
              "weekToDate",
              "previousWeek",
              "monthToDate",
              "previousMonth"
            ]
          },
          "range": {
            "$ref": "#/components/schemas/DateRange"
          }
        }
      },
      "DateRange": {
        "description": "**中文**\n\n有界起止时间范围（含首尾），两端同为 `YYYY-MM-DD HH:mm:ss` 或同为 `YYYY-MM-DD`，不可混用；单次范围不超过 366 天。\n\n**English**\n\nBounded start and end time range, inclusive at both ends. Both endpoints must use YYYY-MM-DD HH:mm:ss or both must use YYYY-MM-DD, with no mixing. Each range must not exceed 366 days.",
        "oneOf": [
          {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "$ref": "#/components/schemas/LocalDateTime"
            }
          },
          {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "$ref": "#/components/schemas/LocalDate"
            }
          }
        ]
      },
      "LocalDateTime": {
        "type": "string",
        "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]) ([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
        "description": "**中文**\n\n`YYYY-MM-DD HH:mm:ss`，按 `meta.timezone` 解释，不带 Z、时区偏移或毫秒。\n\n**English**\n\nYYYY-MM-DD HH:mm:ss, interpreted in meta.timezone, without Z, time-zone offsets, or milliseconds."
      },
      "LocalDate": {
        "type": "string",
        "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
        "description": "**中文**\n\n`YYYY-MM-DD`；按营业日 `stat_date` 或本地日期解释。\n\n**English**\n\nYYYY-MM-DD, interpreted as the business date (stat_date) or local date."
      },
      "WidgetDimensionInput": {
        "type": "object",
        "x-class-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)",
        "required": [
          "member",
          "mode"
        ],
        "properties": {
          "member": {
            "type": "string",
            "minLength": 1
          },
          "mode": {
            "type": "string",
            "enum": [
              "page",
              "local",
              "fixed"
            ]
          },
          "values": {
            "$ref": "#/components/schemas/Names"
          }
        }
      },
      "WidgetResultOrder": {
        "type": "object",
        "required": [
          "metric",
          "by",
          "direction"
        ],
        "properties": {
          "metric": {
            "type": "string",
            "minLength": 1
          },
          "by": {
            "type": "string",
            "enum": [
              "current",
              "difference",
              "changeRate"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        }
      },
      "SubjectTarget": {
        "type": "string",
        "enum": [
          "site",
          "space",
          "slot"
        ],
        "description": "**中文**\n\n指标查询的统计对象类型：site 场所整体、space 空间、slot 槽位。\n\n**English**\n\nMetric query subject type: site for whole sites, space for spaces, and slot for slots."
      },
      "Filters": {
        "type": "array",
        "description": "**中文**\n\n顶层数组元素取 AND；筛选维度不必出现在结果分组 `dimensions` 中。\n\n**English**\n\nCombine top-level array elements with AND. Filter dimensions need not appear in the dimensions used for result grouping.",
        "items": {
          "$ref": "#/components/schemas/DimensionFilter"
        }
      },
      "DimensionFilter": {
        "description": "**中文**\n\n叶子条件或 `and`/`or` 逻辑节点；每个叶子只能引用对应指标允许的维度。\n\n**English**\n\nA leaf predicate or an and/or logical node. Each leaf may reference only dimensions allowed by the corresponding metric.",
        "x-class-extra-annotation": "@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)\n@JsonSubTypes({@JsonSubTypes.Type(FilterPredicate.class), @JsonSubTypes.Type(FilterAnd.class), @JsonSubTypes.Type(FilterOr.class)})\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FilterPredicate"
          },
          {
            "$ref": "#/components/schemas/FilterAnd"
          },
          {
            "$ref": "#/components/schemas/FilterOr"
          }
        ]
      },
      "FilterPredicate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "member",
          "operator"
        ],
        "properties": {
          "member": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n`meta` 发布的维度名称。\n\n**English**\n\nDimension name published in meta."
          },
          "operator": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n必须出现在该维度的 `operators` 列表中。\n\n**English**\n\nMust be listed in operators for the dimension."
          },
          "values": {
            "type": "array",
            "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY)",
            "items": {
              "type": "string",
              "nullable": true
            },
            "description": "**中文**\n\n双键实体 ID 维度的非空值遵循 UidString；行政区划 ID 与其他文本或数值维度沿用各自标识或字符串值。仅当操作符明确支持时可含 `null`。\n\n**English**\n\nNon-null values for dual-key entity ID dimensions conform to UidString. Administrative region IDs and other textual or numeric dimensions retain their own identifiers or string values. null is allowed only when explicitly supported by the operator."
          }
        }
      },
      "FilterAnd": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "and"
        ],
        "properties": {
          "and": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/DimensionFilter"
            },
            "description": "**中文**\n\n须同时满足的筛选子条件列表。\n\n**English**\n\nList of child filter conditions that must all be satisfied."
          }
        }
      },
      "FilterOr": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "or"
        ],
        "properties": {
          "or": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/DimensionFilter"
            },
            "description": "**中文**\n\n须至少满足其中一项的筛选子条件列表。\n\n**English**\n\nList of child filter conditions of which at least one must be satisfied."
          }
        }
      },
      "QueryOrder": {
        "type": "array",
        "description": "**中文**\n\n实体 ID 维度按内部主键排序，非实体维度按基础值或时间顺序排序。\n\n**English**\n\nEntity ID dimensions are sorted by internal primary key; other dimensions are sorted by base value or chronological order.",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "member",
            "direction"
          ],
          "properties": {
            "member": {
              "type": "string",
              "description": "**中文**\n\n排序字段名称，使用查询支持的维度、时间分组或指标名称。\n\n**English**\n\nSort member name, using a dimension, time grouping, or metric name supported by the query."
            },
            "direction": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "**中文**\n\n排序方向，asc 为升序，desc 为降序。\n\n**English**\n\nSort direction. asc means ascending and desc means descending."
            }
          }
        }
      },
      "IdString": {
        "type": "string",
        "minLength": 1,
        "description": "**中文**\n\n非双键实体的既有标识（如角色、用户、行政区划、绑定关系），以字符串传递。\n\n**English**\n\nExisting identifiers for entities without dual keys (such as roles, users, administrative regions and bindings), transmitted as strings."
      }
    },
    "parameters": {
      "AcceptLanguage": {
        "name": "Accept-Language",
        "in": "header",
        "required": false,
        "description": "**中文**\n\n业务数据显示语言。按权重匹配 en-US、zh-CN 或对应语言前缀，无法匹配时使用基础字段。\n\n**English**\n\nLanguage for business data display. Match en-US, zh-CN, or the corresponding language prefixes by preference weight. Fall back to base fields if no language matches.",
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "**中文**\n\n本次请求唯一追踪标识，与响应体 `requestId` 一致。\n\n**English**\n\nUnique trace identifier for this request, matching requestId in the response body.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "**中文**\n\n凭证缺失、无效或已过期（code 40101）。\n\n**English**\n\nCredentials missing, invalid, or expired (code 40101).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40101,
              "data": null,
              "message": "Authentication required or token expired.",
              "requestId": "550e8400-e29b-41d4-a716-446655440001"
            }
          }
        }
      },
      "Forbidden": {
        "description": "**中文**\n\n无权访问目标资源（code 40301）。\n\n**English**\n\nUnauthorized access to the target resource (code 40301).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40301,
              "data": null,
              "message": "Access denied for the requested scope or resource.",
              "requestId": "550e8400-e29b-41d4-a716-446655440002"
            }
          }
        }
      },
      "InternalError": {
        "description": "**中文**\n\n平台内部未预期错误（code 50001）。\n\n**English**\n\nUnexpected internal platform error (code 50001).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 50001,
              "data": null,
              "message": "Internal server error.",
              "requestId": "550e8400-e29b-41d4-a716-446655440007"
            }
          }
        }
      },
      "NotFound": {
        "description": "**中文**\n\n目标资源不存在（code 40401）。\n\n**English**\n\nTarget resource not found (code 40401).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40401,
              "data": null,
              "message": "Requested resource not found.",
              "requestId": "550e8400-e29b-41d4-a716-446655440003"
            }
          }
        }
      },
      "Unavailable": {
        "description": "**中文**\n\n依赖服务不可用（code 50301）。\n\n**English**\n\nDependent service unavailable (code 50301).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 50301,
              "data": null,
              "message": "Dependent service unavailable.",
              "requestId": "550e8400-e29b-41d4-a716-446655440009"
            }
          }
        }
      }
    }
  }
}
