/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import type { ObjectId } from "mongoose";
import { Schema } from "mongoose";
import type { SystemEvent, WebhookChannel, WebhookEventStatus } from "../interfaces/SystemTypes";
import type { IBase } from "./Base";
import type { ITeam } from "./Team";
import type { IUser } from "./User";
/**
 * --------- DATA REFERENCES ---------
 */
export interface IDataReferences extends Pick<IBase, "project" | "workspace" | "owner"> {
    /**
     * Refferenced build
     */
    build?: string | ObjectId;
    /**
     * Refferenced release
     */
    release?: string | ObjectId;
    /**
     * Refferenced app
     */
    app?: string | ObjectId;
    /**
     * Refferenced database
     */
    database?: string | ObjectId;
    /**
     * Refferenced database backup
     */
    databaseBackup?: string | ObjectId;
    /**
     * Refferenced git provider
     */
    gitProvider?: string | ObjectId;
    /**
     * Refferenced cluster
     */
    cluster?: string | ObjectId;
    /**
     * Refferenced container registry
     */
    registry?: string | ObjectId;
    /**
     * Refferenced framework
     */
    framework?: string | ObjectId;
    /**
     * Refferenced team
     */
    team?: string | ObjectId;
}
/**
 * An interface that extends IBase and describes the properties of an webhook.
 *
 * @interface IWebhook
 * @extends {IBase}
 */
export interface IWebhook extends IBase, IDataReferences {
    /**
     * The name of the webhook.
     *
     * @type {string}
     * @memberof IWebhook
     */
    name?: string;
    /**
     * A event status associated with the webhook.
     *
     * @type {WebhookEventStatus}
     * @memberof IWebhook
     */
    status?: WebhookEventStatus;
    /**
     * A list of {IUser} that subscribed to this webhook.
     */
    consumers?: string[] | ObjectId[] | IUser[];
    /**
     * A list of {ITeam} that subscribed to this webhook.
     */
    consumerGroups?: string[] | ObjectId[] | ITeam[];
    /**
     * A list of {IWebhook} events.
     */
    events?: SystemEvent[];
    /**
     * A list of {IWebhook} channels.
     */
    channels?: WebhookChannel[];
    /**
     * The callback URL of the webhook.
     *
     * @type {string}
     * @memberof IWebhook
     */
    url?: string;
    /**
     * The HTTP method used for the webhook.
     *
     * @type {string}
     * @memberof IWebhook
     */
    method?: string;
    /**
     * The request headers of a callback URL.
     *
     * @type {*}
     * @memberof IWebhook
     */
    headers?: any;
    /**
     * The request body of a callback URL.
     *
     * @type {*}
     * @memberof IWebhook
     */
    body?: any;
    /**
     * The HTTP status code (200, 403, 503,...) returned from the webhook.
     *
     * @type {*}
     * @memberof IWebhook
     */
    httpStatus?: any;
    /**
     * The response status code (0 or 1) returned from the webhook.
     *
     * @type {number}
     * @memberof IWebhook
     */
    responseStatus?: number;
}
export declare const webhookSchema: Schema<IWebhook, import("mongoose").Model<IWebhook, any, any, any, import("mongoose").Document<unknown, any, IWebhook> & IWebhook & Required<{
    _id: string | import("mongoose").Types.ObjectId;
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IWebhook, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IWebhook>> & import("mongoose").FlatRecord<IWebhook> & Required<{
    _id: string | import("mongoose").Types.ObjectId;
}>>;
export declare const WebhookModel: import("mongoose").Model<IWebhook, {}, {}, {}, import("mongoose").Document<unknown, {}, IWebhook> & IWebhook & Required<{
    _id: string | import("mongoose").Types.ObjectId;
}>, any>;
//# sourceMappingURL=Webhook.d.ts.map