import { PaginatedAuthorizedResources, PolicyAssignmentTargetType, ResourceType } from '../../types/graphql.v2'; export interface AuthorizeResourcesParams { /** * 权限分组的 code */ namespace: string; /** * 租户的 ID。如果是给租户下的用户、组织机构授权,此参数必填。 */ tenantId?: string; /** * 授权项目,每一项分别给不同类型的主体授权不同的资源 */ opts: { targetType: PolicyAssignmentTargetType; targetIdentifiers: string[]; resources: { code: string; actions: string[]; resourceType: ResourceType; }[]; }[]; } export interface RevokeResourcesParams { /** * 权限分组的 code */ namespace: string; /** * 租户的 ID。如果是给租户下的用户、组织机构授权,此参数必填。 */ tenantId?: string; /** * 授权项目,每一项分别给不同类型的主体授权不同的资源 */ opts: { targetType: PolicyAssignmentTargetType; targetIdentifiers: string[]; resources: { code: string; actions: string[]; resourceType: ResourceType; }[]; }[]; } export interface ListAuthorizedResourcesBatchParams { /** * 权限分组的 code */ namespace: string; /** * 租户的 ID。如果是给租户下的用户、组织机构授权,此参数必填。 */ tenantId?: string; /** * 目标对象列表 */ targets: { targetType: PolicyAssignmentTargetType; targetIdentifier: string; }[]; /** 授权的资源类型 */ resourceType?: ResourceType; } export interface ListAuthorizedResourcesBatchResult { list: PaginatedAuthorizedResources[]; }