import { TGroup, TGroupDetail } from '@zkdb/common'; import { Result } from '../../utils/result'; /** * Group configuration type * @property {string} groupDescription - Group description * @property {string} groupName - Group name */ export type TGroupConfig = Pick; /** * Group Interface for group operations */ export interface IGroup { /** * Get group information * @returns A Result containing group detail information */ info(): Promise>; /** * Create a new group * @param groupConfig - Group configuration object * @returns A Result containing true if successful, false otherwise */ create(groupConfig?: Omit): Promise>; /** * Check the existence of a group in database * @returns A Result containing true if the group exists, false otherwise */ exist(): Promise>; /** * Update an existing group * @param groupConfig - Group configuration object * @returns A Result containing true if successful, false otherwise */ update(groupConfig: Partial): Promise>; /** * Add a list of users to a group * @param listUserId - List of users to add to the group * @returns A Result containing true if successful, false otherwise */ userAdd(listUserId: bigint[]): Promise>; /** * Remove a list of users from a group * @param listUserId - List of users to remove from the group * @returns A Result containing true if successful, false otherwise */ userRemove(listUserId: bigint[]): Promise>; }