import { BaseEntityClass } from '../base/base.entity'; import { INTEGRATION_EVENT_TYPE, WEBHOOK_SECURITY, WEBHOOK_SOURCE } from './enum'; import { IntegrationEntity } from '..'; /** * @property filterMatch events to invlude based on key value * @property filterExclude events to exclude based on key value */ declare class IntegrationEventConfig { filterMatch?: { key: string; value: string; exact: boolean; }[]; filterExclude?: { key: string; value: string; exact: boolean; }[]; } /** * @property name of table on which to listen to events */ export declare class IntegrationEventConfigDatabase extends IntegrationEventConfig { tableName: string; } /** * @property namespace under which to listen for webhooks * @property source: where the webhook originates * @property security: depending on source, the security used for verification */ export declare class IntegrationEventConfigWebhook extends IntegrationEventConfig { namespace?: string; source: WEBHOOK_SOURCE; security: WEBHOOK_SECURITY; } export declare class IntegrationEventSecrets { secret: string; } export declare class IntegrationEventEntity extends BaseEntityClass { id: string; title: string; type: INTEGRATION_EVENT_TYPE; config: IntegrationEventConfigDatabase | IntegrationEventConfigWebhook; /** * Stores integration event secret. * This is most commonly used for incoming webhhoks (token for validation) */ secrets: IntegrationEventSecrets; integrations: IntegrationEntity[]; isEnabled: boolean; constructor(partial: Partial); } export {};