import type { Directory, JacksonOption, DatabaseStore, DirectoryType, PaginationParams, IUsers, IGroups, IWebhookEventsLogger, IEventController, Response, Index } from '../../typings';
interface DirectoryConfigParams {
    db: DatabaseStore;
    opts: JacksonOption;
    users: IUsers;
    groups: IGroups;
    logger: IWebhookEventsLogger;
    eventController: IEventController;
}
interface FilterByParams extends PaginationParams {
    product?: string;
    provider?: DirectoryType;
}
export declare class DirectoryConfig {
    private _store;
    private opts;
    private db;
    private users;
    private groups;
    private logger;
    private eventController;
    constructor({ db, opts, users, groups, logger, eventController }: DirectoryConfigParams);
    private store;
    /**
     * @openapi
     * components:
     *   schemas:
     *     Directory:
     *       type: object
     *       properties:
     *         id:
     *           type: string
     *           description: Directory ID
     *         name:
     *           type: string
     *           description: name
     *         tenant:
     *           type: string
     *           description: Tenant
     *         product:
     *           type: string
     *           description: Product
     *         type:
     *           type: string
     *           description: Directory provider
     *         deactivated:
     *           type: boolean
     *           description: Status
     *         log_webhook_events:
     *           type: boolean
     *           description: If true, webhook requests will be logged
     *         scim:
     *           type: object
     *           properties:
     *             path:
     *               type: string
     *               description: SCIM path
     *             endpoint:
     *               type: string
     *               description: SCIM url
     *             secret:
     *               type: string
     *               description: SCIM secret
     *         webhook:
     *           type: object
     *           properties:
     *             endpoint:
     *               type: string
     *               description: Webhook url
     *             secret:
     *               type: string
     *               description: Webhook secret
     *   parameters:
     *     tenant:
     *       name: tenant
     *       in: query
     *       description: Tenant (Optional if directoryId is provided)
     *       schema:
     *         type: string
     *     product:
     *       name: product
     *       in: query
     *       description: Product (Optional if directoryId is provided)
     *       schema:
     *         type: string
     *     directoryId:
     *       name: directoryId
     *       in: query
     *       description: Directory ID (Optional if tenant/product is provided)
     *       schema:
     *         type: string
     *     pageOffset:
     *       name: pageOffset
     *       in: query
     *       description: Starting point from which the set of records are retrieved
     *       schema:
     *         type: string
     *     pageLimit:
     *       name: pageLimit
     *       in: query
     *       description: Number of records to be fetched for the page
     *       schema:
     *         type: string
     *     pageToken:
     *       name: pageToken
     *       in: query
     *       description: Token used for DynamoDB pagination
     *       schema:
     *         type: string
     *
     */
    /**
     * @openapi
     * /api/v1/dsync:
     *   post:
     *     tags:
     *       - Directory Sync
     *     summary: Create a directory connection
     *     requestBody:
     *       content:
     *         application/json:
     *           schema:
     *             required:
     *               - product
     *               - tenant
     *             type: object
     *             properties:
     *               tenant:
     *                 type: string
     *                 description: Tenant
     *               product:
     *                 type: string
     *                 description: Product
     *               name:
     *                 type: string
     *                 description: Name
     *               webhook_url:
     *                 type: string
     *                 description: Webhook URL
     *               webhook_secret:
     *                 type: string
     *                 description: Webhook secret
     *               type:
     *                 type: string
     *                 description: Directory provider. (Supported values are azure-scim-v2, onelogin-scim-v2, okta-scim-v2, jumpcloud-scim-v2, generic-scim-v2, google)
     *       required: true
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               $ref: "#/components/schemas/Directory"
     */
    create(params: {
        name?: string;
        tenant: string;
        product: string;
        webhook_url?: string;
        webhook_secret?: string;
        type?: DirectoryType;
        google_access_token?: string;
        google_refresh_token?: string;
    }): Promise<Response<Directory>>;
    /**
     * @openapi
     * /api/v1/dsync/{directoryId}:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get a directory connection by id
     *     parameters:
     *       - name: directoryId
     *         in: path
     *         description: Directory ID
     *         required: true
     *         schema:
     *           type: string
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               $ref: "#/components/schemas/Directory"
     */
    get(id: string): Promise<Response<Directory>>;
    /**
     * @openapi
     * /api/v1/dsync/{directoryId}:
     *   patch:
     *     tags:
     *       - Directory Sync
     *     summary: Update a directory connection
     *     parameters:
     *       - name: directoryId
     *         in: path
     *         description: Directory ID
     *         required: true
     *         schema:
     *           type: string
     *     requestBody:
     *       content:
     *         application/json:
     *           schema:
     *             type: object
     *             properties:
     *               name:
     *                 type: string
     *                 description: Name
     *               webhook_url:
     *                 type: string
     *                 description: Webhook URL
     *               webhook_secret:
     *                 type: string
     *                 description: Webhook secret
     *               log_webhook_events:
     *                 type: string
     *                 description: If true, webhook requests will be logged
     *               deactivated:
     *                 type: string
     *                 description: If true, the directory connection will be deactivated
     *               google_access_token:
     *                 type: string
     *                 description: Google access token
     *               google_refresh_token:
     *                 type: string
     *                 description: Google refresh token
     *       required: true
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               $ref: "#/components/schemas/Directory"
     */
    update(id: string, param: Omit<Partial<Directory>, 'id' | 'tenant' | 'prodct' | 'scim' | 'type'> & {
        webhook_url?: string;
        webhook_secret?: string;
    }): Promise<Response<Directory>>;
    /**
     * @openapi
     * /api/v1/dsync:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get a directory connection by tenant and product
     *     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
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               type: array
     *               items:
     *                 $ref: "#/components/schemas/Directory"
     */
    getByTenantAndProduct(tenant: string, product: string): Promise<Response<Directory[]>>;
    getAll(params?: PaginationParams): Promise<Response<Directory[]> & {
        pageToken?: string;
    }>;
    /**
     * @openapi
     * /api/v1/dsync/{directoryId}:
     *   delete:
     *     tags:
     *       - Directory Sync
     *     summary: Delete a directory connection by id
     *     parameters:
     *       - name: directoryId
     *         in: path
     *         description: Directory ID
     *         required: true
     *         schema:
     *           type: string
     *     responses:
     *       200:
     *         description: Success
     *         content: {}
     */
    delete(id: string): Promise<Response<null>>;
    private transform;
    /**
     * @openapi
     * /api/v1/dsync/product:
     *   get:
     *     tags:
     *       - Directory Sync
     *     summary: Get directory connections by product
     *     parameters:
     *      - $ref: '#/components/parameters/product'
     *      - $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/Directory'
     *                  pageToken:
     *                    type: string
     *                    description: token for pagination
     */
    filterBy(params?: FilterByParams): Promise<Response<Directory[]> & {
        pageToken?: string;
    }>;
    getCount(idx?: Index): Promise<number | undefined>;
}
export {};
