import { MigrateRequest, WebhooksResult, WebhookSubscription } from '../models'; import MigratortronBaseService from './MigratortronBaseService'; import ContensisRepository from '../repositories/ContensisRepository'; export type MigrateWebhook = { diff?: string; error?: AppError; existing?: WebhookSubscription; id: string; originalId: string; source: WebhookSubscription; status: string; webhook: WebhookSubscription; }; export type GetWebhooksArgs = { name?: string; ids?: string[]; enabled?: boolean; }; declare class WebhookMigrationService extends MigratortronBaseService { created: string[]; updated: string[]; deleted: string[]; constructor(payload: MigrateRequest, preview: boolean); MigrateWebhooks: (getBy?: GetWebhooksArgs) => Promise; /** Loads all Webhooks from source and target repos into memory */ GetWebhooksToMigrate: (getBy?: GetWebhooksArgs) => Promise; BuildTargetWebhooks: () => Promise; CommitWebhooks: () => Promise; QueueWebhooks: (target: ContensisRepository) => Promise; CommitWebhook: (migrateWebhook: MigrateWebhook, repo: ContensisRepository) => Promise<[AppError | null, WebhookSubscription | undefined]>; mapMigrateResult: () => WebhooksResult; } export default WebhookMigrationService;