import type { Group, DatabaseStore, PaginationParams, Response, GroupMembership } from '../../typings';
import { Base } from './Base';
interface CreateGroupParams {
    directoryId: string;
    name: string;
    raw: any;
    id?: string;
}
export declare class Groups extends Base {
    constructor({ db }: {
        db: DatabaseStore;
    });
    create(params: CreateGroupParams): Promise<Response<Group>>;
    /**
     * @openapi
     * components:
     *   schemas:
     *     Group:
     *       type: object
     *       properties:
     *         id:
     *           type: string
     *           description: Group ID
     *         name:
     *           type: string
     *           description: Group name
     *         raw:
     *           type: object
     *           properties: {}
     *           description: Raw group attributes from the Identity Provider
     *     Member:
     *       type: object
     *       properties:
     *         user_id:
     *           type: string
     *           description: ID of the user
     *   parameters:
     *     groupId:
     *       name: groupId
     *       in: path
     *       description: Group ID
     *       required: true
     *       schema:
     *         type: string
     *
     */
    /**
     * @openapi
     * /api/v1/dsync/groups/{groupId}:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get group by id from a directory
     *     parameters:
     *       - name: tenant
     *         in: query
     *         description: Tenant (Optional if directoryId is provided)
     *         schema:
     *           type: string
     *       - name: product
     *         in: query
     *         description: Product (Optional if directoryId is provided)
     *         schema:
     *           type: string
     *       - name: directoryId
     *         in: query
     *         description: Directory ID (Optional if tenant/product is provided)
     *         schema:
     *           type: string
     *       - name: groupId
     *         in: path
     *         description: Group ID
     *         required: true
     *         schema:
     *           type: string
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               $ref: "#/components/schemas/Group"
     */
    get(id: string): Promise<Response<Group>>;
    update(id: string, param: {
        name: string;
        raw: any;
    }): Promise<Response<Group>>;
    delete(id: string): Promise<Response<null>>;
    addUserToGroup(groupId: string, userId: string): Promise<void>;
    removeUserFromGroup(groupId: string, userId: string): Promise<void>;
    isUserInGroup(groupId: string, userId: string): Promise<boolean>;
    search(displayName: string, directoryId: string): Promise<Response<Group[]>>;
    /**
     * @openapi
     * /api/v1/dsync/groups:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get groups from a directory
     *     parameters:
     *       - $ref: '#/components/parameters/tenant'
     *       - $ref: '#/components/parameters/product'
     *       - $ref: '#/components/parameters/directoryId'
     *       - $ref: '#/components/parameters/pageOffset'
     *       - $ref: '#/components/parameters/pageLimit'
     *       - $ref: '#/components/parameters/pageToken'
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *              schema:
     *                type: object
     *                properties:
     *                  data:
     *                    type: array
     *                    items:
     *                      $ref: '#/components/schemas/Group'
     *                  pageToken:
     *                    type: string
     *                    description: token for pagination
     */
    getAll(params: PaginationParams & {
        directoryId?: string;
    }): Promise<Response<Group[]>>;
    /**
     * @openapi
     * /api/v1/dsync/groups/{groupId}/members:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get list of members in a group
     *     parameters:
     *       - $ref: '#/components/parameters/tenant'
     *       - $ref: '#/components/parameters/product'
     *       - $ref: '#/components/parameters/groupId'
     *       - $ref: '#/components/parameters/directoryId'
     *       - $ref: '#/components/parameters/pageOffset'
     *       - $ref: '#/components/parameters/pageLimit'
     *       - $ref: '#/components/parameters/pageToken'
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *              schema:
     *                type: object
     *                properties:
     *                  data:
     *                    type: array
     *                    items:
     *                      $ref: '#/components/schemas/Member'
     */
    getGroupMembers(parmas: {
        groupId: string;
    } & PaginationParams): Promise<Response<Pick<GroupMembership, 'user_id'>[]>>;
    deleteAll(directoryId: string): Promise<void>;
    removeAllUsers(groupId: string): Promise<void>;
}
export {};
