# Generated public contract; edit the source and localization catalog.
openapi: 3.1.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
info:
  title: OrbitSpace 身份与访问 API
  version: 1.0.0
  description: 身份与访问的公开 v1 应用接口契约。协议生命周期与能力可用状态见集成指南。
servers:
  - url: https://api.orbitspace.dev
security:
  - bearerAuth: []
paths:
  /api/v1/access-policies:evaluate:
    post:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_EvaluateEffectivePermissions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EvaluateEffectivePermissionsRequest"
        required: true
        description: 评估实际生效的权限的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EffectivePermissions"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 评估实际生效的权限
      description: 评估实际生效的权限。 请求字段应遵循下方的 Schema。
  /api/v1/account:
    get:
      tags:
        - AuthService
      operationId: AuthService_GetAccount
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Account"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取个人账号
      description: 读取个人账号。
    put:
      tags:
        - AuthService
      operationId: AuthService_UpdateAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAccountRequest"
        required: true
        description: 更新个人账号的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Account"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新个人账号
      description: 更新个人账号。 请求字段应遵循下方的 Schema。
  /api/v1/account/team-invitations:accept:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_AcceptTeamInvitation
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptTeamInvitationRequest"
        required: true
        description: 接受团队邀请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TenantAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 接受团队邀请
      description: 接受团队邀请。 请求字段应遵循下方的 Schema。
  /api/v1/account:change-password:
    post:
      tags:
        - AuthService
      operationId: AuthService_ChangePassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChangePasswordRequest"
        required: true
        description: 修改密码的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChangePasswordResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 修改密码
      description: 修改密码。 请求字段应遵循下方的 Schema。
  /api/v1/api-token-policy:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_GetAPITokenPolicy
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APITokenPolicy"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取API Token 策略
      description: 读取API Token 策略。
  /api/v1/api-tokens:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_ListAPITokens
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAPITokensResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出API Token
      description: 列出API Token。
    post:
      tags:
        - IdentityService
      operationId: IdentityService_CreateAPIToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAPITokenRequest"
        required: true
        description: 创建API Token的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAPITokenResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建API Token
      description: 创建API Token。 请求字段应遵循下方的 Schema。
  /api/v1/api-tokens/{id}:revoke:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_RevokeAPIToken
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeAPITokenRequest"
        required: true
        description: 撤销API Token的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIToken"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销API Token
      description: 撤销API Token。 请求字段应遵循下方的 Schema。
  /api/v1/audit-events:
    get:
      tags:
        - AuditService
      operationId: AuditService_ListAuditEvents
      parameters:
        - name: identity_id
          in: query
          schema:
            type: string
          description: 身份标识符。
        - name: action_prefix
          in: query
          schema:
            type: string
          description: 操作前缀。
        - name: resource_type
          in: query
          schema:
            type: string
          description: 资源类型。
        - name: resource_id
          in: query
          schema:
            type: string
          description: 资源标识符。
        - name: outcome
          in: query
          schema:
            type: string
          description: 结果。
        - name: created_at_from
          in: query
          schema:
            type: string
            format: date-time
          description: 创建时间来源。
        - name: created_at_to
          in: query
          schema:
            type: string
            format: date-time
          description: 创建时间目标。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: request_id
          in: query
          schema:
            type: string
          description: 请求标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAuditEventsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出审计事件
      description: 列出审计事件。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/audit-events:export:
    get:
      tags:
        - AuditService
      operationId: AuditService_ExportAuditEvents
      parameters:
        - name: identity_id
          in: query
          schema:
            type: string
          description: 身份标识符。
        - name: action_prefix
          in: query
          schema:
            type: string
          description: 操作前缀。
        - name: resource_type
          in: query
          schema:
            type: string
          description: 资源类型。
        - name: resource_id
          in: query
          schema:
            type: string
          description: 资源标识符。
        - name: outcome
          in: query
          schema:
            type: string
          description: 结果。
        - name: created_at_from
          in: query
          schema:
            type: string
            format: date-time
          description: 创建时间来源。
        - name: created_at_to
          in: query
          schema:
            type: string
            format: date-time
          description: 创建时间目标。
        - name: request_id
          in: query
          schema:
            type: string
          description: 请求标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExportAuditEventsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 导出审计事件
      description: 导出审计事件。
  /api/v1/auth/login:
    post:
      tags:
        - AuthService
      security: []
      operationId: AuthService_Login
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginRequest"
        required: true
        description: 登录的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoginResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 登录
      description: 登录。 请求字段应遵循下方的 Schema。
  /api/v1/auth/logout:
    post:
      tags:
        - AuthService
      security: []
      operationId: AuthService_Logout
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LogoutRequest"
        required: true
        description: 退出登录的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LogoutResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 退出登录
      description: 退出登录。 请求字段应遵循下方的 Schema。
  /api/v1/auth/refresh:
    post:
      tags:
        - AuthService
      security: []
      operationId: AuthService_RefreshToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RefreshTokenRequest"
        required: true
        description: 刷新令牌的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LoginResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 刷新令牌
      description: 刷新令牌。 请求字段应遵循下方的 Schema。
  /api/v1/auth/sessions:
    get:
      tags:
        - AuthService
      operationId: AuthService_ListSessions
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListSessionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出登录会话
      description: 列出登录会话。
  /api/v1/auth/sessions/{id}:revoke:
    post:
      tags:
        - AuthService
      operationId: AuthService_RevokeSession
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeSessionRequest"
        required: true
        description: 撤销登录会话的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthSession"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销登录会话
      description: 撤销登录会话。 请求字段应遵循下方的 Schema。
  /api/v1/auth/sessions:revoke-others:
    post:
      tags:
        - AuthService
      operationId: AuthService_RevokeOtherSessions
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeOtherSessionsRequest"
        required: true
        description: 撤销其他登录会话的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RevokeOtherSessionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销其他登录会话
      description: 撤销其他登录会话。 请求字段应遵循下方的 Schema。
  /api/v1/custom-roles:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_ListCustomRoles
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListCustomRolesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出自定义角色
      description: 列出自定义角色。
    post:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_CreateCustomRole
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCustomRoleRequest"
        required: true
        description: 创建自定义角色的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomRole"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建自定义角色
      description: 创建自定义角色。 请求字段应遵循下方的 Schema。
  /api/v1/custom-roles/{id}:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_GetCustomRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomRole"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取自定义角色
      description: 读取自定义角色。
    put:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_UpdateCustomRole
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCustomRoleRequest"
        required: true
        description: 更新自定义角色的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomRole"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新自定义角色
      description: 更新自定义角色。 请求字段应遵循下方的 Schema。
  /api/v1/identities:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_ProvisionIdentity
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProvisionIdentityRequest"
        required: true
        description: 开通身份的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 开通身份
      description: 开通身份。 请求字段应遵循下方的 Schema。
  /api/v1/identity:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_GetCurrentIdentity
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取当前身份
      description: 读取当前身份。
  /api/v1/identity-providers:
    get:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_ListIdentityProviders
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListIdentityProvidersResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出身份提供方
      description: 列出身份提供方。
    post:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_CreateIdentityProvider
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateIdentityProviderRequest"
        required: true
        description: 创建身份提供方的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProvider"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建身份提供方
      description: 创建身份提供方。 请求字段应遵循下方的 Schema。
  /api/v1/identity-providers/{id}:
    get:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_GetIdentityProvider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProvider"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取身份提供方
      description: 读取身份提供方。
    put:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_UpdateIdentityProvider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateIdentityProviderRequest"
        required: true
        description: 更新身份提供方的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProvider"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新身份提供方
      description: 更新身份提供方。 请求字段应遵循下方的 Schema。
  /api/v1/identity-providers/{id}:rotate-scim-token:
    post:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_RotateIdentityProviderSCIMToken
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RotateIdentityProviderSCIMTokenRequest"
        required: true
        description: 轮换身份提供方 SCIM Token的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RotateIdentityProviderSCIMTokenResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 轮换身份提供方 SCIM Token
      description: 轮换身份提供方 SCIM Token。 请求字段应遵循下方的 Schema。
  /api/v1/identity-providers/{provider_id}/group-mappings:
    get:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_ListIdentityProviderGroupMappings
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: string
          description: 服务商标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListIdentityProviderGroupMappingsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出身份提供方群组映射
      description: 列出身份提供方群组映射。
    post:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_UpsertIdentityProviderGroupMapping
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: string
          description: 服务商标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpsertIdentityProviderGroupMappingRequest"
        required: true
        description: 创建或更新身份提供方群组映射的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityProviderGroupMapping"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建或更新身份提供方群组映射
      description: 创建或更新身份提供方群组映射。 请求字段应遵循下方的 Schema。
  /api/v1/identity-providers/{provider_id}/group-mappings/{mapping_id}:
    delete:
      tags:
        - IdentityProviderService
      operationId: IdentityProviderService_DeleteIdentityProviderGroupMapping
      parameters:
        - name: provider_id
          in: path
          required: true
          schema:
            type: string
          description: 服务商标识符。
        - name: mapping_id
          in: path
          required: true
          schema:
            type: string
          description: 映射标识符。
      responses:
        "200":
          description: 请求成功。
          content: {}
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 删除身份提供方群组映射
      description: 删除身份提供方群组映射。
  /api/v1/identity/members:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_ListTenantMembers
      parameters:
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTenantMembersResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出团队成员
      description: 列出团队成员。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/identity/members/{membership_id}:
    delete:
      tags:
        - IdentityService
      operationId: IdentityService_RemoveTenantMember
      parameters:
        - name: membership_id
          in: path
          required: true
          schema:
            type: string
          description: 成员关系标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamOperationResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 移除团队成员
      description: 移除团队成员。
    patch:
      tags:
        - IdentityService
      operationId: IdentityService_UpdateTenantMembership
      parameters:
        - name: membership_id
          in: path
          required: true
          schema:
            type: string
          description: 成员关系标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTenantMembershipRequest"
        required: true
        description: 更新团队成员关系的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TenantMember"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新团队成员关系
      description: 更新团队成员关系。 请求字段应遵循下方的 Schema。
  /api/v1/identity/preferences:
    patch:
      tags:
        - IdentityService
      operationId: IdentityService_UpdateMyPreferences
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMyPreferencesRequest"
        required: true
        description: 更新个人偏好的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Identity"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新个人偏好
      description: 更新个人偏好。 请求字段应遵循下方的 Schema。
  /api/v1/identity/tenant-preferences:
    patch:
      tags:
        - IdentityService
      operationId: IdentityService_UpdateTenantPreferences
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTenantPreferencesRequest"
        required: true
        description: 更新团队偏好的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TenantAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新团队偏好
      description: 更新团队偏好。 请求字段应遵循下方的 Schema。
  /api/v1/identity/tenants:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_ListMyTenants
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListMyTenantsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出可访问团队
      description: 列出可访问团队。
  /api/v1/policy-bindings:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_ListPolicyBindings
      parameters:
        - name: scope_id
          in: query
          schema:
            type: string
          description: 权限范围标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListPolicyBindingsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出权限策略绑定
      description: 列出权限策略绑定。
    post:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_CreatePolicyBinding
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePolicyBindingRequest"
        required: true
        description: 创建权限策略绑定的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyBinding"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建权限策略绑定
      description: 创建权限策略绑定。 请求字段应遵循下方的 Schema。
  /api/v1/policy-bindings/{id}:
    delete:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_DeletePolicyBinding
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content: {}
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 删除权限策略绑定
      description: 删除权限策略绑定。
  /api/v1/policy-permission-catalog:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_GetPolicyPermissionCatalog
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyPermissionCatalog"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取权限目录
      description: 读取权限目录。
  /api/v1/policy-scopes:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_ListPolicyScopes
      parameters:
        - name: kind
          in: query
          schema:
            enum:
              - POLICY_SCOPE_KIND_UNSPECIFIED
              - POLICY_SCOPE_KIND_ORGANIZATION
              - POLICY_SCOPE_KIND_TEAM
              - POLICY_SCOPE_KIND_PROJECT
            type: string
            format: enum
            description: 类别。
            x-enum-descriptions:
              POLICY_SCOPE_KIND_UNSPECIFIED: 未指定
              POLICY_SCOPE_KIND_ORGANIZATION: 组织
              POLICY_SCOPE_KIND_TEAM: 团队
              POLICY_SCOPE_KIND_PROJECT: 项目
          description: 类别。
        - name: parent_id
          in: query
          schema:
            type: string
          description: 父级标识符。
        - name: status
          in: query
          schema:
            enum:
              - POLICY_SCOPE_STATUS_UNSPECIFIED
              - POLICY_SCOPE_STATUS_ACTIVE
              - POLICY_SCOPE_STATUS_ARCHIVED
            type: string
            format: enum
            description: 状态。
            x-enum-descriptions:
              POLICY_SCOPE_STATUS_UNSPECIFIED: 未指定
              POLICY_SCOPE_STATUS_ACTIVE: 已启用
              POLICY_SCOPE_STATUS_ARCHIVED: 已归档
          description: 状态。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListPolicyScopesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出项目策略范围
      description: 列出项目策略范围。
    post:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_CreatePolicyScope
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePolicyScopeRequest"
        required: true
        description: 创建项目策略范围的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyScope"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建项目策略范围
      description: 创建项目策略范围。 请求字段应遵循下方的 Schema。
  /api/v1/policy-scopes/{id}:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_GetPolicyScope
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyScope"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取项目策略范围
      description: 读取项目策略范围。
    put:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_UpdatePolicyScope
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePolicyScopeRequest"
        required: true
        description: 更新项目策略范围的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyScope"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新项目策略范围
      description: 更新项目策略范围。 请求字段应遵循下方的 Schema。
  /api/v1/policy-scopes/{team_scope_id}/members:
    get:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_ListPolicyTeamMembers
      parameters:
        - name: team_scope_id
          in: path
          required: true
          schema:
            type: string
          description: 团队权限范围标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListPolicyTeamMembersResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出项目团队成员
      description: 列出项目团队成员。
  /api/v1/policy-scopes/{team_scope_id}/members/{identity_id}:
    put:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_AddPolicyTeamMember
      parameters:
        - name: team_scope_id
          in: path
          required: true
          schema:
            type: string
          description: 团队权限范围标识符。
        - name: identity_id
          in: path
          required: true
          schema:
            type: string
          description: 身份标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddPolicyTeamMemberRequest"
        required: true
        description: 添加项目团队成员的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PolicyTeamMember"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 添加项目团队成员
      description: 添加项目团队成员。 请求字段应遵循下方的 Schema。
    delete:
      tags:
        - AccessPolicyService
      operationId: AccessPolicyService_RemovePolicyTeamMember
      parameters:
        - name: team_scope_id
          in: path
          required: true
          schema:
            type: string
          description: 团队权限范围标识符。
        - name: identity_id
          in: path
          required: true
          schema:
            type: string
          description: 身份标识符。
      responses:
        "200":
          description: 请求成功。
          content: {}
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 移除项目团队成员
      description: 移除项目团队成员。
  /api/v1/service-accounts:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_CreateServiceAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateServiceAccountRequest"
        required: true
        description: 创建服务账号的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentityAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建服务账号
      description: 创建服务账号。 请求字段应遵循下方的 Schema。
  /api/v1/service-accounts/{identity_id}/api-tokens:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_ListServiceAccountAPITokens
      parameters:
        - name: identity_id
          in: path
          required: true
          schema:
            type: string
          description: 身份标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAPITokensResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出服务账号 API Token
      description: 列出服务账号 API Token。
    post:
      tags:
        - IdentityService
      operationId: IdentityService_CreateServiceAccountAPIToken
      parameters:
        - name: identity_id
          in: path
          required: true
          schema:
            type: string
          description: 身份标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateServiceAccountAPITokenRequest"
        required: true
        description: 创建服务账号 API Token的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateAPITokenResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建服务账号 API Token
      description: 创建服务账号 API Token。 请求字段应遵循下方的 Schema。
  /api/v1/service-accounts/{identity_id}/api-tokens/{token_id}:revoke:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_RevokeServiceAccountAPIToken
      parameters:
        - name: identity_id
          in: path
          required: true
          schema:
            type: string
          description: 身份标识符。
        - name: token_id
          in: path
          required: true
          schema:
            type: string
          description: Token标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeServiceAccountAPITokenRequest"
        required: true
        description: 撤销服务账号 API Token的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIToken"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销服务账号 API Token
      description: 撤销服务账号 API Token。 请求字段应遵循下方的 Schema。
  /api/v1/team:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_GetTeam
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Team"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取团队
      description: 读取团队。
    put:
      tags:
        - IdentityService
      operationId: IdentityService_UpdateTeam
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTeamRequest"
        required: true
        description: 更新团队的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Team"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 更新团队
      description: 更新团队。 请求字段应遵循下方的 Schema。
  /api/v1/team/invitations:
    get:
      tags:
        - IdentityService
      operationId: IdentityService_ListTeamInvitations
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTeamInvitationsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出团队邀请
      description: 列出团队邀请。
    post:
      tags:
        - IdentityService
      operationId: IdentityService_CreateTeamInvitation
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTeamInvitationRequest"
        required: true
        description: 创建团队邀请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamInvitationDelivery"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建团队邀请
      description: 创建团队邀请。 请求字段应遵循下方的 Schema。
  /api/v1/team/invitations/{id}:reissue:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_ReissueTeamInvitation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReissueTeamInvitationRequest"
        required: true
        description: 重新签发团队邀请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamInvitationDelivery"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 重新签发团队邀请
      description: 重新签发团队邀请。 请求字段应遵循下方的 Schema。
  /api/v1/team/invitations/{id}:revoke:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_RevokeTeamInvitation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeTeamInvitationRequest"
        required: true
        description: 撤销团队邀请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamInvitation"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 撤销团队邀请
      description: 撤销团队邀请。 请求字段应遵循下方的 Schema。
  /api/v1/team:archive:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_ArchiveTeam
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArchiveTeamRequest"
        required: true
        description: 归档团队的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamOperationResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 归档团队
      description: 归档团队。 请求字段应遵循下方的 Schema。
  /api/v1/team:leave:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_LeaveTeam
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LeaveTeamRequest"
        required: true
        description: 退出团队的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamOperationResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 退出团队
      description: 退出团队。 请求字段应遵循下方的 Schema。
  /api/v1/team:transfer-ownership:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_TransferTeamOwnership
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransferTeamOwnershipRequest"
        required: true
        description: 转移团队所有权的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamOperationResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 转移团队所有权
      description: 转移团队所有权。 请求字段应遵循下方的 Schema。
  /api/v1/teams:
    post:
      tags:
        - IdentityService
      operationId: IdentityService_CreateTeam
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTeamRequest"
        required: true
        description: 创建团队的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TenantAccess"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建团队
      description: 创建团队。 请求字段应遵循下方的 Schema。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    APIToken:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        identity_id:
          type: string
          description: 身份标识符。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        name:
          type: string
          description: 名称。
        scopes:
          type: array
          items:
            type: string
          description: 权限范围列表。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        last_used_at:
          type: string
          format: date-time
          description: 最近已使用时间，使用 RFC 3339 时间格式。
        revoked_at:
          type: string
          format: date-time
          description: 撤销时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        allowed_ip_ranges:
          type: array
          items:
            type: string
          description: 空列表表示不限制来源；非空值必须为规范化的 IPv4/IPv6 CIDR 网段。
      description: API Token结构。
    APITokenPolicy:
      type: object
      properties:
        default_ttl:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: 默认有效期。
        max_ttl:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: 最大有效期。
        allow_no_expiration:
          type: boolean
          description: 允许不过期。
        current_client_ip:
          type: string
          description: 当前客户端IP。
      description: API Token 策略结构。
    AcceptTeamInvitationRequest:
      type: object
      properties:
        invitation_token:
          type: string
          description: 邀请Token。
      description: 接受团队邀请的请求结构。
    Account:
      type: object
      properties:
        identity:
          $ref: "#/components/schemas/Identity"
          description: 身份。
        has_local_password:
          type: boolean
          description: 是否具有本地密码。
        current_session_id:
          type: string
          description: 当前会话标识符。
      description: 个人账号结构。
    AddPolicyTeamMemberRequest:
      type: object
      properties:
        team_scope_id:
          type: string
          description: 团队权限范围标识符。
        identity_id:
          type: string
          description: 身份标识符。
      description: 添加项目团队成员的请求结构。
    ArchiveTeamRequest:
      type: object
      properties:
        confirmation_name:
          type: string
          description: 确认名称。
      description: 归档团队的请求结构。
    AuditEvent:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        identity_id:
          type: string
          description: 身份标识符。
        actor_kind:
          type: string
          description: 操作者类别。
        action:
          type: string
          description: 操作。
        resource_type:
          type: string
          description: 资源类型。
        resource_id:
          type: string
          description: 资源标识符。
        outcome:
          type: string
          description: 结果。
        request_id:
          type: string
          description: 请求标识符。
        metadata_json:
          type: string
          description: 元数据JSON。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
      description: 审计事件结构。
    AuthSession:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        client_type:
          type: string
          description: 客户端类型。
        device_name:
          type: string
          description: 设备名称。
        user_agent:
          type: string
          description: 用户Agent。
        ip_address:
          type: string
          description: IP地址。
        access_expires_at:
          type: string
          format: date-time
          description: 访问到期时间，使用 RFC 3339 时间格式。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        last_seen_at:
          type: string
          format: date-time
          description: 最近发现时间，使用 RFC 3339 时间格式。
        revoked_at:
          type: string
          format: date-time
          description: 撤销时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        audience:
          type: string
          description: 不可变的会话用途；平台会话不能选择租户。
      description: 认证会话结构。
    ChangePasswordRequest:
      type: object
      properties:
        current_password:
          type: string
          description: 当前密码。
        new_password:
          type: string
          description: 新密码。
      description: 修改密码的请求结构。
    ChangePasswordResponse:
      type: object
      properties:
        revoked_sessions:
          type: integer
          format: int32
          description: 撤销会话。
      description: 修改密码的响应结构。
    CreateAPITokenRequest:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        scopes:
          type: array
          items:
            type: string
          description: 权限范围列表。
        ttl:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: 最多指定一个有效期字段；全部省略时采用平台默认值。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        no_expiration:
          type: boolean
          description: 不过期。
        allowed_ip_ranges:
          type: array
          items:
            type: string
          description: 允许IP网段列表。
      description: 创建API Token的请求结构。
    CreateAPITokenResponse:
      type: object
      properties:
        token:
          $ref: "#/components/schemas/APIToken"
          description: 令牌值。
        access_token:
          type: string
          description: 访问Token。
      description: 创建API Token的响应结构。
    CreateCustomRoleRequest:
      type: object
      properties:
        slug:
          type: string
          description: 短名称。
        display_name:
          type: string
          description: 展示名称。
        description:
          type: string
          description: 说明。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
      description: 创建自定义角色的请求结构。
    CreateIdentityProviderRequest:
      type: object
      properties:
        slug:
          type: string
          description: 短名称。
        protocol:
          enum:
            - IDENTITY_PROVIDER_PROTOCOL_UNSPECIFIED
            - IDENTITY_PROVIDER_PROTOCOL_OIDC
            - IDENTITY_PROVIDER_PROTOCOL_SAML
          type: string
          format: enum
          description: 协议。
          x-enum-descriptions:
            IDENTITY_PROVIDER_PROTOCOL_UNSPECIFIED: 未指定
            IDENTITY_PROVIDER_PROTOCOL_OIDC: OIDC
            IDENTITY_PROVIDER_PROTOCOL_SAML: SAML
        config:
          $ref: "#/components/schemas/IdentityProviderConfig"
          description: 配置。
      description: 创建身份提供方的请求结构。
    CreatePolicyBindingRequest:
      type: object
      properties:
        scope_id:
          type: string
          description: 权限范围标识符。
        subject_kind:
          enum:
            - POLICY_SUBJECT_KIND_UNSPECIFIED
            - POLICY_SUBJECT_KIND_IDENTITY
            - POLICY_SUBJECT_KIND_TEAM
          type: string
          format: enum
          description: 主体类别。
          x-enum-descriptions:
            POLICY_SUBJECT_KIND_UNSPECIFIED: 未指定
            POLICY_SUBJECT_KIND_IDENTITY: 身份
            POLICY_SUBJECT_KIND_TEAM: 团队
        subject_id:
          type: string
          description: 主体标识符。
        role_id:
          type: string
          description: 角色标识符。
      description: 创建权限策略绑定的请求结构。
    CreatePolicyScopeRequest:
      type: object
      properties:
        kind:
          enum:
            - POLICY_SCOPE_KIND_UNSPECIFIED
            - POLICY_SCOPE_KIND_ORGANIZATION
            - POLICY_SCOPE_KIND_TEAM
            - POLICY_SCOPE_KIND_PROJECT
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            POLICY_SCOPE_KIND_UNSPECIFIED: 未指定
            POLICY_SCOPE_KIND_ORGANIZATION: 组织
            POLICY_SCOPE_KIND_TEAM: 团队
            POLICY_SCOPE_KIND_PROJECT: 项目
        parent_id:
          type: string
          description: 父级标识符。
        slug:
          type: string
          description: 短名称。
        display_name:
          type: string
          description: 展示名称。
      description: 创建项目策略范围的请求结构。
    CreateServiceAccountAPITokenRequest:
      type: object
      properties:
        identity_id:
          type: string
          description: 身份标识符。
        name:
          type: string
          description: 名称。
        scopes:
          type: array
          items:
            type: string
          description: 权限范围列表。
        ttl:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: 与个人 API Token 使用相同的有效期及网络访问策略。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        no_expiration:
          type: boolean
          description: 不过期。
        allowed_ip_ranges:
          type: array
          items:
            type: string
          description: 允许IP网段列表。
      description: 创建服务账号 API Token的请求结构。
    CreateServiceAccountRequest:
      type: object
      properties:
        subject:
          type: string
          description: 主体。
        display_name:
          type: string
          description: 展示名称。
        email:
          type: string
          description: 邮箱。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
      description: 创建服务账号的请求结构。
    CreateTeamInvitationRequest:
      type: object
      properties:
        email:
          type: string
          description: 邮箱。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
      description: 创建团队邀请的请求结构。
    CreateTeamRequest:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        locale:
          type: string
          description: 语言。
      description: 创建团队的请求结构。
    CustomRole:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        slug:
          type: string
          description: 短名称。
        display_name:
          type: string
          description: 展示名称。
        description:
          type: string
          description: 说明。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
        status:
          enum:
            - CUSTOM_ROLE_STATUS_UNSPECIFIED
            - CUSTOM_ROLE_STATUS_ACTIVE
            - CUSTOM_ROLE_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            CUSTOM_ROLE_STATUS_UNSPECIFIED: 未指定
            CUSTOM_ROLE_STATUS_ACTIVE: 已启用
            CUSTOM_ROLE_STATUS_DISABLED: 已停用
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 自定义角色结构。
    EffectivePermissionSource:
      type: object
      properties:
        kind:
          type: string
          description: 类别。
        binding_id:
          type: string
          description: 绑定标识符。
        scope_id:
          type: string
          description: 权限范围标识符。
        subject_id:
          type: string
          description: 主体标识符。
        role_id:
          type: string
          description: 角色标识符。
        role_slug:
          type: string
          description: 角色短名称。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
      description: 实际生效权限来源结构。
    EffectivePermissions:
      type: object
      properties:
        identity_id:
          type: string
          description: 身份标识符。
        scope:
          $ref: "#/components/schemas/PolicyScope"
          description: 权限范围。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
        sources:
          type: array
          items:
            $ref: "#/components/schemas/EffectivePermissionSource"
          description: 来源列表。
        allowed:
          type: boolean
          description: 允许。
      description: 实际生效的权限结构。
    EvaluateEffectivePermissionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          description: 身份标识符。
        scope_id:
          type: string
          description: 权限范围标识符。
        permission:
          type: string
          description: 权限。
      description: 评估实际生效的权限的请求结构。
    ExportAuditEventsResponse:
      type: object
      properties:
        content_type:
          type: string
          description: 内容类型。
        filename:
          type: string
          description: 文件名。
        sha256:
          type: string
          description: SHA-256 摘要。
        event_count:
          type: integer
          format: int32
          description: 事件数量。
        data:
          type: string
          format: bytes
          description: 数据，使用 Base64 编码。
      description: 导出审计事件的响应结构。
    Identity:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        kind:
          enum:
            - IDENTITY_KIND_UNSPECIFIED
            - IDENTITY_KIND_USER
            - IDENTITY_KIND_SERVICE
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            IDENTITY_KIND_UNSPECIFIED: 未指定
            IDENTITY_KIND_USER: 用户
            IDENTITY_KIND_SERVICE: 服务身份
        issuer:
          type: string
          description: 签发方。
        subject:
          type: string
          description: 主体。
        display_name:
          type: string
          description: 展示名称。
        email:
          type: string
          description: 邮箱。
        disabled_at:
          type: string
          format: date-time
          description: 停用时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        locale:
          type: string
          description: 留空时依次继承当前租户、浏览器和英语的语言设置。
        time_zone:
          type: string
          description: 时间时区。
        avatar_url:
          type: string
          description: 头像URL。
      description: 身份结构。
    IdentityAccess:
      type: object
      properties:
        identity:
          $ref: "#/components/schemas/Identity"
          description: 身份。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        scopes:
          type: array
          items:
            type: string
          description: 权限范围列表。
        membership:
          $ref: "#/components/schemas/TenantMembership"
          description: 成员关系。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
      description: 身份访问结构。
    IdentityProvider:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        slug:
          type: string
          description: 短名称。
        display_name:
          type: string
          description: 展示名称。
        protocol:
          enum:
            - IDENTITY_PROVIDER_PROTOCOL_UNSPECIFIED
            - IDENTITY_PROVIDER_PROTOCOL_OIDC
            - IDENTITY_PROVIDER_PROTOCOL_SAML
          type: string
          format: enum
          description: 协议。
          x-enum-descriptions:
            IDENTITY_PROVIDER_PROTOCOL_UNSPECIFIED: 未指定
            IDENTITY_PROVIDER_PROTOCOL_OIDC: OIDC
            IDENTITY_PROVIDER_PROTOCOL_SAML: SAML
        status:
          enum:
            - IDENTITY_PROVIDER_STATUS_UNSPECIFIED
            - IDENTITY_PROVIDER_STATUS_ACTIVE
            - IDENTITY_PROVIDER_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            IDENTITY_PROVIDER_STATUS_UNSPECIFIED: 未指定
            IDENTITY_PROVIDER_STATUS_ACTIVE: 已启用
            IDENTITY_PROVIDER_STATUS_DISABLED: 已停用
        issuer_uri:
          type: string
          description: 签发方URI。
        audience:
          type: string
          description: 受众。
        tenant_claim:
          type: string
          description: 租户声明。
        groups_claim:
          type: string
          description: 群组声明。
        email_claim:
          type: string
          description: 邮箱声明。
        display_name_claim:
          type: string
          description: 展示名称声明。
        jit_enabled:
          type: boolean
          description: 即时配置已启用。
        default_role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 默认角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        saml_entity_id:
          type: string
          description: SAML实体标识符。
        saml_metadata_url:
          type: string
          description: SAML元数据URL。
        saml_sp_entity_id:
          type: string
          description: SAML服务提供方实体标识符。
        saml_acs_url:
          type: string
          description: SAML 断言消费服务的回调 URL。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 身份提供方结构。
    IdentityProviderConfig:
      type: object
      properties:
        display_name:
          type: string
          description: 展示名称。
        issuer_uri:
          type: string
          description: 签发方URI。
        audience:
          type: string
          description: 受众。
        tenant_claim:
          type: string
          description: 租户声明。
        groups_claim:
          type: string
          description: 群组声明。
        email_claim:
          type: string
          description: 邮箱声明。
        display_name_claim:
          type: string
          description: 展示名称声明。
        jit_enabled:
          type: boolean
          description: 即时配置已启用。
        default_role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 默认角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        saml_entity_id:
          type: string
          description: SAML实体标识符。
        saml_metadata_url:
          type: string
          description: SAML元数据URL。
        saml_sp_entity_id:
          type: string
          description: SAML服务提供方实体标识符。
        saml_acs_url:
          type: string
          description: SAML 断言消费服务的回调 URL。
      description: 身份服务商配置结构。
    IdentityProviderGroupMapping:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        provider_id:
          type: string
          description: 服务商标识符。
        external_group:
          type: string
          description: 外部群组。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 身份提供方群组映射结构。
    LeaveTeamRequest:
      type: object
      properties: {}
      description: 退出团队的请求结构。
    ListAPITokensResponse:
      type: object
      properties:
        tokens:
          type: array
          items:
            $ref: "#/components/schemas/APIToken"
          description: Token列表。
      description: 列出API Token的响应结构。
    ListAuditEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: "#/components/schemas/AuditEvent"
          description: 事件列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出审计事件的响应结构。
    ListCustomRolesResponse:
      type: object
      properties:
        roles:
          type: array
          items:
            $ref: "#/components/schemas/CustomRole"
          description: 角色列表。
      description: 列出自定义角色的响应结构。
    ListIdentityProviderGroupMappingsResponse:
      type: object
      properties:
        mappings:
          type: array
          items:
            $ref: "#/components/schemas/IdentityProviderGroupMapping"
          description: 映射列表。
      description: 列出身份提供方群组映射的响应结构。
    ListIdentityProvidersResponse:
      type: object
      properties:
        providers:
          type: array
          items:
            $ref: "#/components/schemas/IdentityProvider"
          description: 服务商列表。
      description: 列出身份提供方的响应结构。
    ListMyTenantsResponse:
      type: object
      properties:
        tenants:
          type: array
          items:
            $ref: "#/components/schemas/TenantAccess"
          description: 租户列表。
      description: 列出可访问团队的响应结构。
    ListPolicyBindingsResponse:
      type: object
      properties:
        bindings:
          type: array
          items:
            $ref: "#/components/schemas/PolicyBinding"
          description: 绑定列表。
      description: 列出权限策略绑定的响应结构。
    ListPolicyScopesResponse:
      type: object
      properties:
        scopes:
          type: array
          items:
            $ref: "#/components/schemas/PolicyScope"
          description: 权限范围列表。
      description: 列出项目策略范围的响应结构。
    ListPolicyTeamMembersResponse:
      type: object
      properties:
        members:
          type: array
          items:
            $ref: "#/components/schemas/PolicyTeamMember"
          description: 成员列表。
      description: 列出项目团队成员的响应结构。
    ListSessionsResponse:
      type: object
      properties:
        sessions:
          type: array
          items:
            $ref: "#/components/schemas/AuthSession"
          description: 会话列表。
      description: 列出登录会话的响应结构。
    ListTeamInvitationsResponse:
      type: object
      properties:
        invitations:
          type: array
          items:
            $ref: "#/components/schemas/TeamInvitation"
          description: 邀请列表。
      description: 列出团队邀请的响应结构。
    ListTenantMembersResponse:
      type: object
      properties:
        members:
          type: array
          items:
            $ref: "#/components/schemas/TenantMember"
          description: 成员列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出团队成员的响应结构。
    LoginRequest:
      type: object
      properties:
        email:
          type: string
          description: 邮箱。
        password:
          type: string
          description: 密码。
        client_type:
          type: string
          description: 客户端类型。
        device_name:
          type: string
          description: 设备名称。
      description: 登录的请求结构。
    LoginResponse:
      type: object
      properties:
        access_token:
          type: string
          description: 访问Token。
        token_type:
          type: string
          description: Token类型。
        expires_in:
          type: integer
          format: int32
          description: 到期位置。
        refresh_token:
          type: string
          description: 刷新Token。
        identity:
          $ref: "#/components/schemas/Identity"
          description: 身份。
      description: 登录的响应结构。
    LogoutRequest:
      type: object
      properties:
        refresh_token:
          type: string
          description: 刷新Token。
      description: 退出登录的请求结构。
    LogoutResponse:
      type: object
      properties: {}
      description: 退出登录的响应结构。
    PolicyBinding:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        scope_id:
          type: string
          description: 权限范围标识符。
        subject_kind:
          enum:
            - POLICY_SUBJECT_KIND_UNSPECIFIED
            - POLICY_SUBJECT_KIND_IDENTITY
            - POLICY_SUBJECT_KIND_TEAM
          type: string
          format: enum
          description: 主体类别。
          x-enum-descriptions:
            POLICY_SUBJECT_KIND_UNSPECIFIED: 未指定
            POLICY_SUBJECT_KIND_IDENTITY: 身份
            POLICY_SUBJECT_KIND_TEAM: 团队
        subject_id:
          type: string
          description: 主体标识符。
        role_id:
          type: string
          description: 角色标识符。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 权限策略绑定结构。
    PolicyPermissionCatalog:
      type: object
      properties:
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
      description: 权限目录结构。
    PolicyScope:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        kind:
          enum:
            - POLICY_SCOPE_KIND_UNSPECIFIED
            - POLICY_SCOPE_KIND_ORGANIZATION
            - POLICY_SCOPE_KIND_TEAM
            - POLICY_SCOPE_KIND_PROJECT
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            POLICY_SCOPE_KIND_UNSPECIFIED: 未指定
            POLICY_SCOPE_KIND_ORGANIZATION: 组织
            POLICY_SCOPE_KIND_TEAM: 团队
            POLICY_SCOPE_KIND_PROJECT: 项目
        parent_id:
          type: string
          description: 父级标识符。
        slug:
          type: string
          description: 短名称。
        display_name:
          type: string
          description: 展示名称。
        status:
          enum:
            - POLICY_SCOPE_STATUS_UNSPECIFIED
            - POLICY_SCOPE_STATUS_ACTIVE
            - POLICY_SCOPE_STATUS_ARCHIVED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            POLICY_SCOPE_STATUS_UNSPECIFIED: 未指定
            POLICY_SCOPE_STATUS_ACTIVE: 已启用
            POLICY_SCOPE_STATUS_ARCHIVED: 已归档
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 项目策略范围结构。
    PolicyTeamMember:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        team_scope_id:
          type: string
          description: 团队权限范围标识符。
        identity_id:
          type: string
          description: 身份标识符。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
      description: 项目团队成员结构。
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details 错误对象，包含 OrbitSpace 的关联标识扩展字段。
      required:
        - type
        - title
        - status
        - detail
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: 类型。
        title:
          type: string
          description: 标题。
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: 状态。
        detail:
          type: string
          description: 详情。
        instance:
          type: string
          format: uri-reference
          description: 实例。
        code:
          type: string
          pattern: ^[A-Z][A-Z0-9_]*$
          description: 代码。
        request_id:
          type: string
          format: uuid
          description: 请求标识符。
    ProvisionIdentityRequest:
      type: object
      properties:
        kind:
          enum:
            - IDENTITY_KIND_UNSPECIFIED
            - IDENTITY_KIND_USER
            - IDENTITY_KIND_SERVICE
          type: string
          format: enum
          description: 类别。
          x-enum-descriptions:
            IDENTITY_KIND_UNSPECIFIED: 未指定
            IDENTITY_KIND_USER: 用户
            IDENTITY_KIND_SERVICE: 服务身份
        issuer:
          type: string
          description: 签发方。
        subject:
          type: string
          description: 主体。
        display_name:
          type: string
          description: 展示名称。
        email:
          type: string
          description: 邮箱。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
      description: 开通身份的请求结构。
    RefreshTokenRequest:
      type: object
      properties:
        refresh_token:
          type: string
          description: 刷新Token。
      description: 刷新令牌的请求结构。
    ReissueTeamInvitationRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 重新签发团队邀请的请求结构。
    RevokeAPITokenRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 撤销API Token的请求结构。
    RevokeOtherSessionsRequest:
      type: object
      properties: {}
      description: 撤销其他登录会话的请求结构。
    RevokeOtherSessionsResponse:
      type: object
      properties:
        revoked_sessions:
          type: integer
          format: int32
          description: 撤销会话。
      description: 撤销其他登录会话的响应结构。
    RevokeServiceAccountAPITokenRequest:
      type: object
      properties:
        identity_id:
          type: string
          description: 身份标识符。
        token_id:
          type: string
          description: Token标识符。
      description: 撤销服务账号 API Token的请求结构。
    RevokeSessionRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 撤销登录会话的请求结构。
    RevokeTeamInvitationRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 撤销团队邀请的请求结构。
    RotateIdentityProviderSCIMTokenRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      description: 轮换身份提供方 SCIM Token的请求结构。
    RotateIdentityProviderSCIMTokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: 访问Token。
        rotated_at:
          type: string
          format: date-time
          description: 轮换时间，使用 RFC 3339 时间格式。
      description: 轮换身份提供方 SCIM Token的响应结构。
    Team:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        locale:
          type: string
          description: 语言。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        archived_at:
          type: string
          format: date-time
          description: 归档时间，使用 RFC 3339 时间格式。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
      description: 团队结构。
    TeamInvitation:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        email:
          type: string
          description: 邮箱。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        status:
          type: string
          description: 状态。
        expires_at:
          type: string
          format: date-time
          description: 到期时间，使用 RFC 3339 时间格式。
        accepted_at:
          type: string
          format: date-time
          description: 已接受时间，使用 RFC 3339 时间格式。
        revoked_at:
          type: string
          format: date-time
          description: 撤销时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
      description: 团队邀请结构。
    TeamInvitationDelivery:
      type: object
      properties:
        invitation:
          $ref: "#/components/schemas/TeamInvitation"
          description: 邀请。
        invitation_token:
          type: string
          description: 邀请Token。
      description: 团队邀请投递结构。
    TeamOperationResponse:
      type: object
      properties: {}
      description: 团队操作响应结构。
    TenantAccess:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        name:
          type: string
          description: 名称。
        locale:
          type: string
          description: 留空时先继承浏览器语言，再回退到英语。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        membership_id:
          type: string
          description: 成员关系标识符。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
      description: 租户访问结构。
    TenantMember:
      type: object
      properties:
        identity:
          $ref: "#/components/schemas/Identity"
          description: 身份。
        membership:
          $ref: "#/components/schemas/TenantMembership"
          description: 成员关系。
      description: 团队成员结构。
    TenantMembership:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        identity_id:
          type: string
          description: 身份标识符。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        status:
          enum:
            - MEMBERSHIP_STATUS_UNSPECIFIED
            - MEMBERSHIP_STATUS_ACTIVE
            - MEMBERSHIP_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            MEMBERSHIP_STATUS_UNSPECIFIED: 未指定
            MEMBERSHIP_STATUS_ACTIVE: 已启用
            MEMBERSHIP_STATUS_DISABLED: 已停用
        source:
          enum:
            - MEMBERSHIP_SOURCE_UNSPECIFIED
            - MEMBERSHIP_SOURCE_MANUAL
            - MEMBERSHIP_SOURCE_OIDC
            - MEMBERSHIP_SOURCE_SAML
            - MEMBERSHIP_SOURCE_SCIM
          type: string
          format: enum
          description: 来源。
          x-enum-descriptions:
            MEMBERSHIP_SOURCE_UNSPECIFIED: 未指定
            MEMBERSHIP_SOURCE_MANUAL: 人工
            MEMBERSHIP_SOURCE_OIDC: OIDC
            MEMBERSHIP_SOURCE_SAML: SAML
            MEMBERSHIP_SOURCE_SCIM: SCIM
        external_id:
          type: string
          description: 外部标识符。
        disabled_at:
          type: string
          format: date-time
          description: 停用时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        provider_id:
          type: string
          description: 服务商标识符。
        external_username:
          type: string
          description: 外部用户名。
      description: 团队成员关系结构。
    TransferTeamOwnershipRequest:
      type: object
      properties:
        membership_id:
          type: string
          description: 成员关系标识符。
      description: 转移团队所有权的请求结构。
    UpdateAccountRequest:
      type: object
      properties:
        display_name:
          type: string
          description: 展示名称。
        avatar_url:
          type: string
          description: 头像URL。
        locale:
          type: string
          description: 语言。
        time_zone:
          type: string
          description: 时间时区。
      description: 更新个人账号的请求结构。
    UpdateCustomRoleRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        display_name:
          type: string
          description: 展示名称。
        description:
          type: string
          description: 说明。
        permissions:
          type: array
          items:
            type: string
          description: 权限列表。
        status:
          enum:
            - CUSTOM_ROLE_STATUS_UNSPECIFIED
            - CUSTOM_ROLE_STATUS_ACTIVE
            - CUSTOM_ROLE_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            CUSTOM_ROLE_STATUS_UNSPECIFIED: 未指定
            CUSTOM_ROLE_STATUS_ACTIVE: 已启用
            CUSTOM_ROLE_STATUS_DISABLED: 已停用
      description: 更新自定义角色的请求结构。
    UpdateIdentityProviderRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        status:
          enum:
            - IDENTITY_PROVIDER_STATUS_UNSPECIFIED
            - IDENTITY_PROVIDER_STATUS_ACTIVE
            - IDENTITY_PROVIDER_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            IDENTITY_PROVIDER_STATUS_UNSPECIFIED: 未指定
            IDENTITY_PROVIDER_STATUS_ACTIVE: 已启用
            IDENTITY_PROVIDER_STATUS_DISABLED: 已停用
        config:
          $ref: "#/components/schemas/IdentityProviderConfig"
          description: 配置。
      description: 更新身份提供方的请求结构。
    UpdateMyPreferencesRequest:
      type: object
      properties:
        locale:
          type: string
          description: 支持 en、zh-CN；空值表示继承。
      description: 更新个人偏好的请求结构。
    UpdatePolicyScopeRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        display_name:
          type: string
          description: 展示名称。
        status:
          enum:
            - POLICY_SCOPE_STATUS_UNSPECIFIED
            - POLICY_SCOPE_STATUS_ACTIVE
            - POLICY_SCOPE_STATUS_ARCHIVED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            POLICY_SCOPE_STATUS_UNSPECIFIED: 未指定
            POLICY_SCOPE_STATUS_ACTIVE: 已启用
            POLICY_SCOPE_STATUS_ARCHIVED: 已归档
      description: 更新项目策略范围的请求结构。
    UpdateTeamRequest:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        description:
          type: string
          description: 说明。
        locale:
          type: string
          description: 语言。
      description: 更新团队的请求结构。
    UpdateTenantMembershipRequest:
      type: object
      properties:
        membership_id:
          type: string
          description: 成员关系标识符。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
        status:
          enum:
            - MEMBERSHIP_STATUS_UNSPECIFIED
            - MEMBERSHIP_STATUS_ACTIVE
            - MEMBERSHIP_STATUS_DISABLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            MEMBERSHIP_STATUS_UNSPECIFIED: 未指定
            MEMBERSHIP_STATUS_ACTIVE: 已启用
            MEMBERSHIP_STATUS_DISABLED: 已停用
      description: 更新团队成员关系的请求结构。
    UpdateTenantPreferencesRequest:
      type: object
      properties:
        locale:
          type: string
          description: 支持 en、zh-CN；空值表示继承。
      description: 更新团队偏好的请求结构。
    UpsertIdentityProviderGroupMappingRequest:
      type: object
      properties:
        provider_id:
          type: string
          description: 服务商标识符。
        external_group:
          type: string
          description: 外部群组。
        role:
          enum:
            - TENANT_ROLE_UNSPECIFIED
            - TENANT_ROLE_OWNER
            - TENANT_ROLE_ADMIN
            - TENANT_ROLE_MEMBER
            - TENANT_ROLE_VIEWER
            - TENANT_ROLE_WORKER
          type: string
          format: enum
          description: 角色。
          x-enum-descriptions:
            TENANT_ROLE_UNSPECIFIED: 未指定
            TENANT_ROLE_OWNER: 所有者
            TENANT_ROLE_ADMIN: 管理员
            TENANT_ROLE_MEMBER: 成员
            TENANT_ROLE_VIEWER: 查看者
            TENANT_ROLE_WORKER: Worker
      description: 创建或更新身份提供方群组映射的请求结构。
tags:
  - name: AccessPolicyService
    x-displayName: 访问策略
    description: 访问策略相关操作。
  - name: AuthService
    x-displayName: 认证与 API Token
    description: 认证与 API Token相关操作。
  - name: IdentityService
    x-displayName: 账号与团队
    description: 账号与团队相关操作。
  - name: AuditService
    x-displayName: 审计事件
    description: 审计事件相关操作。
  - name: IdentityProviderService
    x-displayName: 企业身份提供方
    description: 企业身份提供方相关操作。
