import type { EmptyObject, IdResponse } from "./common";
export type BaseWebhookPayload = {
    id: string;
    timestamp: string;
    workspace_id: IdResponse;
    workspace_name: string;
    subscription_id: IdResponse;
    integration_id: IdResponse;
    authors: Array<{
        id: IdResponse;
        type: "person";
    } | {
        id: IdResponse;
        type: "bot";
    }>;
    attempt_number: number;
    api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
    accessible_by?: Array<{
        id: IdResponse;
        type: "person";
    } | {
        id: IdResponse;
        type: "bot";
    }>;
};
export type CommentCreatedWebhookPayload = BaseWebhookPayload & {
    type: "comment.created";
    entity: WebhookCommentEntity;
    data: {
        parent: WebhookExternalBlock;
        page_id: IdResponse;
    };
};
export type CommentDeletedWebhookPayload = BaseWebhookPayload & {
    type: "comment.deleted";
    entity: WebhookCommentEntity;
    data: {
        parent: WebhookExternalBlock;
        page_id: IdResponse;
    };
};
export type CommentUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "comment.updated";
    entity: WebhookCommentEntity;
    data: {
        parent: WebhookExternalBlock;
        page_id: IdResponse;
    };
};
export type DataSourceContentUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.content_updated";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
        updated_blocks: Array<WebhookUpdatedBlock>;
    };
};
export type DataSourceCreatedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.created";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DataSourceDeletedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.deleted";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DataSourceMovedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.moved";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DataSourceSchemaUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.schema_updated";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
        updated_properties?: Array<{
            id: string;
            name: string | null;
            action: "created" | "updated" | "deleted";
        }>;
    };
};
export type DataSourceUndeletedWebhookPayload = BaseWebhookPayload & {
    type: "data_source.undeleted";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DatabaseContentUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "database.content_updated";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
        updated_blocks: Array<WebhookUpdatedBlock>;
    };
};
export type DatabaseCreatedWebhookPayload = BaseWebhookPayload & {
    type: "database.created";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DatabaseDeletedWebhookPayload = BaseWebhookPayload & {
    type: "database.deleted";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DatabaseMovedWebhookPayload = BaseWebhookPayload & {
    type: "database.moved";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type DatabaseSchemaUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "database.schema_updated";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
        updated_properties?: Array<{
            id: string;
            name: string | null;
            action: "created" | "updated" | "deleted";
        }>;
    };
};
export type DatabaseUndeletedWebhookPayload = BaseWebhookPayload & {
    type: "database.undeleted";
    entity: WebhookDatabaseEventEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type FileUploadCompletedWebhookPayload = BaseWebhookPayload & {
    type: "file_upload.completed";
    entity: WebhookFileUploadEntity;
};
export type FileUploadCreatedWebhookPayload = BaseWebhookPayload & {
    type: "file_upload.created";
    entity: WebhookFileUploadEntity;
};
export type FileUploadExpiredWebhookPayload = BaseWebhookPayload & {
    type: "file_upload.expired";
    entity: WebhookFileUploadEntity;
};
export type FileUploadUploadFailedWebhookPayload = BaseWebhookPayload & {
    type: "file_upload.upload_failed";
    entity: WebhookFileUploadEntity;
    data: {
        file_import_result: {
            type: "success";
            imported_time: string;
            success: EmptyObject;
        } | {
            type: "error";
            imported_time: string;
            error: {
                type: "validation_error" | "internal_system_error" | "download_error" | "upload_error";
                code: string;
                message: string;
                parameter: string | null;
                status_code: number | null;
            };
        };
    };
};
export type PageContentUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "page.content_updated";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
        updated_blocks: Array<WebhookUpdatedBlock>;
    };
};
export type PageCreatedWebhookPayload = BaseWebhookPayload & {
    type: "page.created";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type PageDeletedWebhookPayload = BaseWebhookPayload & {
    type: "page.deleted";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type PageLockedWebhookPayload = BaseWebhookPayload & {
    type: "page.locked";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type PageMovedWebhookPayload = BaseWebhookPayload & {
    type: "page.moved";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type PagePropertiesUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "page.properties_updated";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
        updated_properties: Array<string>;
    };
};
export type PageTranscriptionBlockTranscriptDeletedWebhookPayload = BaseWebhookPayload & {
    type: "page.transcription_block.transcript_deleted";
    entity: WebhookPageEntity;
    data: {
        target: WebhookExternalBlock;
        transcript_id: string | null;
    };
};
export type PageUndeletedWebhookPayload = BaseWebhookPayload & {
    type: "page.undeleted";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type PageUnlockedWebhookPayload = BaseWebhookPayload & {
    type: "page.unlocked";
    entity: WebhookPageEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type ViewCreatedWebhookPayload = BaseWebhookPayload & {
    type: "view.created";
    entity: WebhookViewEntity;
    data: {
        parent: WebhookParentBlock;
        view_type: string;
    };
};
export type ViewDeletedWebhookPayload = BaseWebhookPayload & {
    type: "view.deleted";
    entity: WebhookViewEntity;
    data: {
        parent: WebhookParentBlock;
    };
};
export type ViewUpdatedWebhookPayload = BaseWebhookPayload & {
    type: "view.updated";
    entity: WebhookViewEntity;
    data: {
        parent: WebhookParentBlock;
        updated_fields: Array<"name" | "filter" | "sorts" | "configuration">;
    };
};
type WebhookCommentEntity = {
    type: "comment";
    id: IdResponse;
};
type WebhookDatabaseEventEntity = {
    id: IdResponse;
    type: "block" | "database" | "data_source";
};
type WebhookExternalBlock = {
    id: IdResponse;
    type: "page" | "database" | "block";
};
type WebhookFileUploadEntity = {
    type: "file_upload";
    id: IdResponse;
};
type WebhookPageEntity = {
    type: "page";
    id: IdResponse;
};
type WebhookParentBlock = {
    id: IdResponse;
    type: "space" | "block" | "page" | "database" | "team";
    data_source_id?: IdResponse;
};
type WebhookUpdatedBlock = {
    id: IdResponse;
    type: "page" | "database" | "block";
};
type WebhookViewEntity = {
    id: IdResponse;
    type: "view";
};
export {};
//# sourceMappingURL=webhooks.d.ts.map