@automate.ax/integration-contracts 0.103.2 → 0.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,16 @@
1
+ import type { CommentCreatedWebhookPayload, CommentDeletedWebhookPayload, CommentUpdatedWebhookPayload, DataSourceContentUpdatedWebhookPayload, DataSourceCreatedWebhookPayload, DataSourceDeletedWebhookPayload, DataSourceMovedWebhookPayload, DataSourceSchemaUpdatedWebhookPayload, DataSourceUndeletedWebhookPayload, DatabaseCreatedWebhookPayload, DatabaseDeletedWebhookPayload, DatabaseMovedWebhookPayload, DatabaseUndeletedWebhookPayload, FileUploadCompletedWebhookPayload, FileUploadCreatedWebhookPayload, FileUploadExpiredWebhookPayload, FileUploadUploadFailedWebhookPayload, PageContentUpdatedWebhookPayload, PageCreatedWebhookPayload, PageDeletedWebhookPayload, PageLockedWebhookPayload, PageMovedWebhookPayload, PagePropertiesUpdatedWebhookPayload, PageTranscriptionBlockTranscriptDeletedWebhookPayload, PageUndeletedWebhookPayload, PageUnlockedWebhookPayload, ViewCreatedWebhookPayload, ViewDeletedWebhookPayload, ViewUpdatedWebhookPayload } from "@notionhq/client";
2
+ import type { CamelCasedPropertiesDeep } from "type-fest";
1
3
  import * as z from "zod";
4
+ type OfficialNotionWebhookEvent = CommentCreatedWebhookPayload | CommentDeletedWebhookPayload | CommentUpdatedWebhookPayload | DataSourceContentUpdatedWebhookPayload | DataSourceCreatedWebhookPayload | DataSourceDeletedWebhookPayload | DataSourceMovedWebhookPayload | DataSourceSchemaUpdatedWebhookPayload | DataSourceUndeletedWebhookPayload | DatabaseCreatedWebhookPayload | DatabaseDeletedWebhookPayload | DatabaseMovedWebhookPayload | DatabaseUndeletedWebhookPayload | FileUploadCompletedWebhookPayload | FileUploadCreatedWebhookPayload | FileUploadExpiredWebhookPayload | FileUploadUploadFailedWebhookPayload | PageContentUpdatedWebhookPayload | PageCreatedWebhookPayload | PageDeletedWebhookPayload | PageLockedWebhookPayload | PageMovedWebhookPayload | PagePropertiesUpdatedWebhookPayload | PageTranscriptionBlockTranscriptDeletedWebhookPayload | PageUndeletedWebhookPayload | PageUnlockedWebhookPayload | ViewCreatedWebhookPayload | ViewDeletedWebhookPayload | ViewUpdatedWebhookPayload;
2
5
  /** Actor reported as the author of a current Notion webhook event. */
3
6
  export type NotionWebhookAuthor = {
4
7
  id: string;
5
8
  type: "agent" | "bot" | "person";
6
9
  };
10
+ /** Official Notion webhook payload with agent-authored changes included. */
11
+ type ExpectedNotionWebhookEvent = OfficialNotionWebhookEvent extends infer TEvent ? TEvent extends OfficialNotionWebhookEvent ? Omit<TEvent, "authors"> & {
12
+ authors: NotionWebhookAuthor[];
13
+ } : never : never;
7
14
  declare const RAW_NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
15
  data: z.ZodObject<{
9
16
  page_id: z.ZodUUID;
@@ -1454,13 +1461,15 @@ declare const RAW_NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
1454
1461
  workspace_name: z.ZodString;
1455
1462
  }, z.core.$catchall<z.ZodJSONSchema>>], "type">;
1456
1463
  /** Current portable Notion webhook payload validated at ingress. */
1457
- export type NotionWebhookEvent = z.infer<typeof RAW_NOTION_EVENT_SCHEMA>;
1458
- export type NotionWebhookEventType = NotionWebhookEvent["type"];
1464
+ type ProviderNotionWebhookEvent = z.infer<typeof RAW_NOTION_EVENT_SCHEMA>;
1465
+ /** Public camelCase representation of a Notion webhook payload. */
1466
+ export type NotionWebhookEvent = CamelCasedPropertiesDeep<ExpectedNotionWebhookEvent>;
1467
+ export type NotionWebhookEventType = ProviderNotionWebhookEvent["type"];
1459
1468
  export type NotionSemanticWebhookEvent<TType extends NotionWebhookEventType> = Extract<NotionWebhookEvent, {
1460
1469
  type: TType;
1461
1470
  }>;
1462
1471
  /** Exact current Notion webhook schema shared by ingress and triggers. */
1463
- export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
1472
+ export declare const NOTION_EVENT_SCHEMA: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
1464
1473
  data: z.ZodObject<{
1465
1474
  page_id: z.ZodUUID;
1466
1475
  parent: z.ZodObject<{
@@ -2908,7 +2917,2080 @@ export declare const NOTION_EVENT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
2908
2917
  timestamp: z.ZodISODateTime;
2909
2918
  workspace_id: z.ZodUUID;
2910
2919
  workspace_name: z.ZodString;
2911
- }, z.core.$catchall<z.ZodJSONSchema>>], "type">;
2920
+ }, z.core.$catchall<z.ZodJSONSchema>>], "type">, z.ZodTransform<{
2921
+ type: "comment.created";
2922
+ timestamp: string;
2923
+ id: string;
2924
+ data: {
2925
+ parent: {
2926
+ id: string;
2927
+ type: "block" | "page" | "database";
2928
+ };
2929
+ pageId: string;
2930
+ };
2931
+ workspaceId: string;
2932
+ workspaceName: string;
2933
+ subscriptionId: string;
2934
+ integrationId: string;
2935
+ attemptNumber: number;
2936
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
2937
+ accessibleBy?: ({
2938
+ id: string;
2939
+ type: "person";
2940
+ } | {
2941
+ id: string;
2942
+ type: "bot";
2943
+ })[] | undefined;
2944
+ entity: {
2945
+ type: "comment";
2946
+ id: string;
2947
+ };
2948
+ authors: {
2949
+ id: string;
2950
+ type: "agent" | "bot" | "person";
2951
+ }[];
2952
+ } | {
2953
+ type: "comment.deleted";
2954
+ timestamp: string;
2955
+ id: string;
2956
+ data: {
2957
+ parent: {
2958
+ id: string;
2959
+ type: "block" | "page" | "database";
2960
+ };
2961
+ pageId: string;
2962
+ };
2963
+ workspaceId: string;
2964
+ workspaceName: string;
2965
+ subscriptionId: string;
2966
+ integrationId: string;
2967
+ attemptNumber: number;
2968
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
2969
+ accessibleBy?: ({
2970
+ id: string;
2971
+ type: "person";
2972
+ } | {
2973
+ id: string;
2974
+ type: "bot";
2975
+ })[] | undefined;
2976
+ entity: {
2977
+ type: "comment";
2978
+ id: string;
2979
+ };
2980
+ authors: {
2981
+ id: string;
2982
+ type: "agent" | "bot" | "person";
2983
+ }[];
2984
+ } | {
2985
+ type: "comment.updated";
2986
+ timestamp: string;
2987
+ id: string;
2988
+ data: {
2989
+ parent: {
2990
+ id: string;
2991
+ type: "block" | "page" | "database";
2992
+ };
2993
+ pageId: string;
2994
+ };
2995
+ workspaceId: string;
2996
+ workspaceName: string;
2997
+ subscriptionId: string;
2998
+ integrationId: string;
2999
+ attemptNumber: number;
3000
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3001
+ accessibleBy?: ({
3002
+ id: string;
3003
+ type: "person";
3004
+ } | {
3005
+ id: string;
3006
+ type: "bot";
3007
+ })[] | undefined;
3008
+ entity: {
3009
+ type: "comment";
3010
+ id: string;
3011
+ };
3012
+ authors: {
3013
+ id: string;
3014
+ type: "agent" | "bot" | "person";
3015
+ }[];
3016
+ } | {
3017
+ type: "data_source.content_updated";
3018
+ timestamp: string;
3019
+ id: string;
3020
+ data: {
3021
+ parent: {
3022
+ id: string;
3023
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3024
+ dataSourceId?: string | undefined;
3025
+ };
3026
+ updatedBlocks: {
3027
+ id: string;
3028
+ type: "block" | "page" | "database";
3029
+ }[];
3030
+ };
3031
+ workspaceId: string;
3032
+ workspaceName: string;
3033
+ subscriptionId: string;
3034
+ integrationId: string;
3035
+ attemptNumber: number;
3036
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3037
+ accessibleBy?: ({
3038
+ id: string;
3039
+ type: "person";
3040
+ } | {
3041
+ id: string;
3042
+ type: "bot";
3043
+ })[] | undefined;
3044
+ entity: {
3045
+ id: string;
3046
+ type: "block" | "database" | "data_source";
3047
+ };
3048
+ authors: {
3049
+ id: string;
3050
+ type: "agent" | "bot" | "person";
3051
+ }[];
3052
+ } | {
3053
+ type: "data_source.created";
3054
+ timestamp: string;
3055
+ id: string;
3056
+ data: {
3057
+ parent: {
3058
+ id: string;
3059
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3060
+ dataSourceId?: string | undefined;
3061
+ };
3062
+ };
3063
+ workspaceId: string;
3064
+ workspaceName: string;
3065
+ subscriptionId: string;
3066
+ integrationId: string;
3067
+ attemptNumber: number;
3068
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3069
+ accessibleBy?: ({
3070
+ id: string;
3071
+ type: "person";
3072
+ } | {
3073
+ id: string;
3074
+ type: "bot";
3075
+ })[] | undefined;
3076
+ entity: {
3077
+ id: string;
3078
+ type: "block" | "database" | "data_source";
3079
+ };
3080
+ authors: {
3081
+ id: string;
3082
+ type: "agent" | "bot" | "person";
3083
+ }[];
3084
+ } | {
3085
+ type: "data_source.deleted";
3086
+ timestamp: string;
3087
+ id: string;
3088
+ data: {
3089
+ parent: {
3090
+ id: string;
3091
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3092
+ dataSourceId?: string | undefined;
3093
+ };
3094
+ };
3095
+ workspaceId: string;
3096
+ workspaceName: string;
3097
+ subscriptionId: string;
3098
+ integrationId: string;
3099
+ attemptNumber: number;
3100
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3101
+ accessibleBy?: ({
3102
+ id: string;
3103
+ type: "person";
3104
+ } | {
3105
+ id: string;
3106
+ type: "bot";
3107
+ })[] | undefined;
3108
+ entity: {
3109
+ id: string;
3110
+ type: "block" | "database" | "data_source";
3111
+ };
3112
+ authors: {
3113
+ id: string;
3114
+ type: "agent" | "bot" | "person";
3115
+ }[];
3116
+ } | {
3117
+ type: "data_source.moved";
3118
+ timestamp: string;
3119
+ id: string;
3120
+ data: {
3121
+ parent: {
3122
+ id: string;
3123
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3124
+ dataSourceId?: string | undefined;
3125
+ };
3126
+ };
3127
+ workspaceId: string;
3128
+ workspaceName: string;
3129
+ subscriptionId: string;
3130
+ integrationId: string;
3131
+ attemptNumber: number;
3132
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3133
+ accessibleBy?: ({
3134
+ id: string;
3135
+ type: "person";
3136
+ } | {
3137
+ id: string;
3138
+ type: "bot";
3139
+ })[] | undefined;
3140
+ entity: {
3141
+ id: string;
3142
+ type: "block" | "database" | "data_source";
3143
+ };
3144
+ authors: {
3145
+ id: string;
3146
+ type: "agent" | "bot" | "person";
3147
+ }[];
3148
+ } | {
3149
+ type: "data_source.schema_updated";
3150
+ timestamp: string;
3151
+ id: string;
3152
+ data: {
3153
+ parent: {
3154
+ id: string;
3155
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3156
+ dataSourceId?: string | undefined;
3157
+ };
3158
+ updatedProperties?: {
3159
+ id: string;
3160
+ name: string | null;
3161
+ action: "deleted" | "created" | "updated";
3162
+ }[] | undefined;
3163
+ };
3164
+ workspaceId: string;
3165
+ workspaceName: string;
3166
+ subscriptionId: string;
3167
+ integrationId: string;
3168
+ attemptNumber: number;
3169
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3170
+ accessibleBy?: ({
3171
+ id: string;
3172
+ type: "person";
3173
+ } | {
3174
+ id: string;
3175
+ type: "bot";
3176
+ })[] | undefined;
3177
+ entity: {
3178
+ id: string;
3179
+ type: "block" | "database" | "data_source";
3180
+ };
3181
+ authors: {
3182
+ id: string;
3183
+ type: "agent" | "bot" | "person";
3184
+ }[];
3185
+ } | {
3186
+ type: "data_source.undeleted";
3187
+ timestamp: string;
3188
+ id: string;
3189
+ data: {
3190
+ parent: {
3191
+ id: string;
3192
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3193
+ dataSourceId?: string | undefined;
3194
+ };
3195
+ };
3196
+ workspaceId: string;
3197
+ workspaceName: string;
3198
+ subscriptionId: string;
3199
+ integrationId: string;
3200
+ attemptNumber: number;
3201
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3202
+ accessibleBy?: ({
3203
+ id: string;
3204
+ type: "person";
3205
+ } | {
3206
+ id: string;
3207
+ type: "bot";
3208
+ })[] | undefined;
3209
+ entity: {
3210
+ id: string;
3211
+ type: "block" | "database" | "data_source";
3212
+ };
3213
+ authors: {
3214
+ id: string;
3215
+ type: "agent" | "bot" | "person";
3216
+ }[];
3217
+ } | {
3218
+ type: "database.created";
3219
+ timestamp: string;
3220
+ id: string;
3221
+ data: {
3222
+ parent: {
3223
+ id: string;
3224
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3225
+ dataSourceId?: string | undefined;
3226
+ };
3227
+ };
3228
+ workspaceId: string;
3229
+ workspaceName: string;
3230
+ subscriptionId: string;
3231
+ integrationId: string;
3232
+ attemptNumber: number;
3233
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3234
+ accessibleBy?: ({
3235
+ id: string;
3236
+ type: "person";
3237
+ } | {
3238
+ id: string;
3239
+ type: "bot";
3240
+ })[] | undefined;
3241
+ entity: {
3242
+ id: string;
3243
+ type: "block" | "database" | "data_source";
3244
+ };
3245
+ authors: {
3246
+ id: string;
3247
+ type: "agent" | "bot" | "person";
3248
+ }[];
3249
+ } | {
3250
+ type: "database.deleted";
3251
+ timestamp: string;
3252
+ id: string;
3253
+ data: {
3254
+ parent: {
3255
+ id: string;
3256
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3257
+ dataSourceId?: string | undefined;
3258
+ };
3259
+ };
3260
+ workspaceId: string;
3261
+ workspaceName: string;
3262
+ subscriptionId: string;
3263
+ integrationId: string;
3264
+ attemptNumber: number;
3265
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3266
+ accessibleBy?: ({
3267
+ id: string;
3268
+ type: "person";
3269
+ } | {
3270
+ id: string;
3271
+ type: "bot";
3272
+ })[] | undefined;
3273
+ entity: {
3274
+ id: string;
3275
+ type: "block" | "database" | "data_source";
3276
+ };
3277
+ authors: {
3278
+ id: string;
3279
+ type: "agent" | "bot" | "person";
3280
+ }[];
3281
+ } | {
3282
+ type: "database.moved";
3283
+ timestamp: string;
3284
+ id: string;
3285
+ data: {
3286
+ parent: {
3287
+ id: string;
3288
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3289
+ dataSourceId?: string | undefined;
3290
+ };
3291
+ };
3292
+ workspaceId: string;
3293
+ workspaceName: string;
3294
+ subscriptionId: string;
3295
+ integrationId: string;
3296
+ attemptNumber: number;
3297
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3298
+ accessibleBy?: ({
3299
+ id: string;
3300
+ type: "person";
3301
+ } | {
3302
+ id: string;
3303
+ type: "bot";
3304
+ })[] | undefined;
3305
+ entity: {
3306
+ id: string;
3307
+ type: "block" | "database" | "data_source";
3308
+ };
3309
+ authors: {
3310
+ id: string;
3311
+ type: "agent" | "bot" | "person";
3312
+ }[];
3313
+ } | {
3314
+ type: "database.undeleted";
3315
+ timestamp: string;
3316
+ id: string;
3317
+ data: {
3318
+ parent: {
3319
+ id: string;
3320
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3321
+ dataSourceId?: string | undefined;
3322
+ };
3323
+ };
3324
+ workspaceId: string;
3325
+ workspaceName: string;
3326
+ subscriptionId: string;
3327
+ integrationId: string;
3328
+ attemptNumber: number;
3329
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3330
+ accessibleBy?: ({
3331
+ id: string;
3332
+ type: "person";
3333
+ } | {
3334
+ id: string;
3335
+ type: "bot";
3336
+ })[] | undefined;
3337
+ entity: {
3338
+ id: string;
3339
+ type: "block" | "database" | "data_source";
3340
+ };
3341
+ authors: {
3342
+ id: string;
3343
+ type: "agent" | "bot" | "person";
3344
+ }[];
3345
+ } | {
3346
+ type: "file_upload.completed";
3347
+ timestamp: string;
3348
+ id: string;
3349
+ workspaceId: string;
3350
+ workspaceName: string;
3351
+ subscriptionId: string;
3352
+ integrationId: string;
3353
+ attemptNumber: number;
3354
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3355
+ accessibleBy?: ({
3356
+ id: string;
3357
+ type: "person";
3358
+ } | {
3359
+ id: string;
3360
+ type: "bot";
3361
+ })[] | undefined;
3362
+ entity: {
3363
+ type: "file_upload";
3364
+ id: string;
3365
+ };
3366
+ authors: {
3367
+ id: string;
3368
+ type: "agent" | "bot" | "person";
3369
+ }[];
3370
+ } | {
3371
+ type: "file_upload.created";
3372
+ timestamp: string;
3373
+ id: string;
3374
+ workspaceId: string;
3375
+ workspaceName: string;
3376
+ subscriptionId: string;
3377
+ integrationId: string;
3378
+ attemptNumber: number;
3379
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3380
+ accessibleBy?: ({
3381
+ id: string;
3382
+ type: "person";
3383
+ } | {
3384
+ id: string;
3385
+ type: "bot";
3386
+ })[] | undefined;
3387
+ entity: {
3388
+ type: "file_upload";
3389
+ id: string;
3390
+ };
3391
+ authors: {
3392
+ id: string;
3393
+ type: "agent" | "bot" | "person";
3394
+ }[];
3395
+ } | {
3396
+ type: "file_upload.expired";
3397
+ timestamp: string;
3398
+ id: string;
3399
+ workspaceId: string;
3400
+ workspaceName: string;
3401
+ subscriptionId: string;
3402
+ integrationId: string;
3403
+ attemptNumber: number;
3404
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3405
+ accessibleBy?: ({
3406
+ id: string;
3407
+ type: "person";
3408
+ } | {
3409
+ id: string;
3410
+ type: "bot";
3411
+ })[] | undefined;
3412
+ entity: {
3413
+ type: "file_upload";
3414
+ id: string;
3415
+ };
3416
+ authors: {
3417
+ id: string;
3418
+ type: "agent" | "bot" | "person";
3419
+ }[];
3420
+ } | {
3421
+ type: "file_upload.upload_failed";
3422
+ timestamp: string;
3423
+ id: string;
3424
+ data: {
3425
+ fileImportResult: {
3426
+ type: "success";
3427
+ importedTime: string;
3428
+ success: {
3429
+ [x: string]: never;
3430
+ };
3431
+ } | {
3432
+ type: "error";
3433
+ importedTime: string;
3434
+ error: {
3435
+ type: "validation_error" | "internal_system_error" | "download_error" | "upload_error";
3436
+ code: string;
3437
+ message: string;
3438
+ parameter: string | null;
3439
+ statusCode: number | null;
3440
+ };
3441
+ };
3442
+ };
3443
+ workspaceId: string;
3444
+ workspaceName: string;
3445
+ subscriptionId: string;
3446
+ integrationId: string;
3447
+ attemptNumber: number;
3448
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3449
+ accessibleBy?: ({
3450
+ id: string;
3451
+ type: "person";
3452
+ } | {
3453
+ id: string;
3454
+ type: "bot";
3455
+ })[] | undefined;
3456
+ entity: {
3457
+ type: "file_upload";
3458
+ id: string;
3459
+ };
3460
+ authors: {
3461
+ id: string;
3462
+ type: "agent" | "bot" | "person";
3463
+ }[];
3464
+ } | {
3465
+ type: "page.content_updated";
3466
+ timestamp: string;
3467
+ id: string;
3468
+ data: {
3469
+ parent: {
3470
+ id: string;
3471
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3472
+ dataSourceId?: string | undefined;
3473
+ };
3474
+ updatedBlocks: {
3475
+ id: string;
3476
+ type: "block" | "page" | "database";
3477
+ }[];
3478
+ };
3479
+ workspaceId: string;
3480
+ workspaceName: string;
3481
+ subscriptionId: string;
3482
+ integrationId: string;
3483
+ attemptNumber: number;
3484
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3485
+ accessibleBy?: ({
3486
+ id: string;
3487
+ type: "person";
3488
+ } | {
3489
+ id: string;
3490
+ type: "bot";
3491
+ })[] | undefined;
3492
+ entity: {
3493
+ type: "page";
3494
+ id: string;
3495
+ };
3496
+ authors: {
3497
+ id: string;
3498
+ type: "agent" | "bot" | "person";
3499
+ }[];
3500
+ } | {
3501
+ type: "page.created";
3502
+ timestamp: string;
3503
+ id: string;
3504
+ data: {
3505
+ parent: {
3506
+ id: string;
3507
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3508
+ dataSourceId?: string | undefined;
3509
+ };
3510
+ };
3511
+ workspaceId: string;
3512
+ workspaceName: string;
3513
+ subscriptionId: string;
3514
+ integrationId: string;
3515
+ attemptNumber: number;
3516
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3517
+ accessibleBy?: ({
3518
+ id: string;
3519
+ type: "person";
3520
+ } | {
3521
+ id: string;
3522
+ type: "bot";
3523
+ })[] | undefined;
3524
+ entity: {
3525
+ type: "page";
3526
+ id: string;
3527
+ };
3528
+ authors: {
3529
+ id: string;
3530
+ type: "agent" | "bot" | "person";
3531
+ }[];
3532
+ } | {
3533
+ type: "page.deleted";
3534
+ timestamp: string;
3535
+ id: string;
3536
+ data: {
3537
+ parent: {
3538
+ id: string;
3539
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3540
+ dataSourceId?: string | undefined;
3541
+ };
3542
+ };
3543
+ workspaceId: string;
3544
+ workspaceName: string;
3545
+ subscriptionId: string;
3546
+ integrationId: string;
3547
+ attemptNumber: number;
3548
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3549
+ accessibleBy?: ({
3550
+ id: string;
3551
+ type: "person";
3552
+ } | {
3553
+ id: string;
3554
+ type: "bot";
3555
+ })[] | undefined;
3556
+ entity: {
3557
+ type: "page";
3558
+ id: string;
3559
+ };
3560
+ authors: {
3561
+ id: string;
3562
+ type: "agent" | "bot" | "person";
3563
+ }[];
3564
+ } | {
3565
+ type: "page.locked";
3566
+ timestamp: string;
3567
+ id: string;
3568
+ data: {
3569
+ parent: {
3570
+ id: string;
3571
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3572
+ dataSourceId?: string | undefined;
3573
+ };
3574
+ };
3575
+ workspaceId: string;
3576
+ workspaceName: string;
3577
+ subscriptionId: string;
3578
+ integrationId: string;
3579
+ attemptNumber: number;
3580
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3581
+ accessibleBy?: ({
3582
+ id: string;
3583
+ type: "person";
3584
+ } | {
3585
+ id: string;
3586
+ type: "bot";
3587
+ })[] | undefined;
3588
+ entity: {
3589
+ type: "page";
3590
+ id: string;
3591
+ };
3592
+ authors: {
3593
+ id: string;
3594
+ type: "agent" | "bot" | "person";
3595
+ }[];
3596
+ } | {
3597
+ type: "page.moved";
3598
+ timestamp: string;
3599
+ id: string;
3600
+ data: {
3601
+ parent: {
3602
+ id: string;
3603
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3604
+ dataSourceId?: string | undefined;
3605
+ };
3606
+ };
3607
+ workspaceId: string;
3608
+ workspaceName: string;
3609
+ subscriptionId: string;
3610
+ integrationId: string;
3611
+ attemptNumber: number;
3612
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3613
+ accessibleBy?: ({
3614
+ id: string;
3615
+ type: "person";
3616
+ } | {
3617
+ id: string;
3618
+ type: "bot";
3619
+ })[] | undefined;
3620
+ entity: {
3621
+ type: "page";
3622
+ id: string;
3623
+ };
3624
+ authors: {
3625
+ id: string;
3626
+ type: "agent" | "bot" | "person";
3627
+ }[];
3628
+ } | {
3629
+ type: "page.properties_updated";
3630
+ timestamp: string;
3631
+ id: string;
3632
+ data: {
3633
+ parent: {
3634
+ id: string;
3635
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3636
+ dataSourceId?: string | undefined;
3637
+ };
3638
+ updatedProperties: string[];
3639
+ };
3640
+ workspaceId: string;
3641
+ workspaceName: string;
3642
+ subscriptionId: string;
3643
+ integrationId: string;
3644
+ attemptNumber: number;
3645
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3646
+ accessibleBy?: ({
3647
+ id: string;
3648
+ type: "person";
3649
+ } | {
3650
+ id: string;
3651
+ type: "bot";
3652
+ })[] | undefined;
3653
+ entity: {
3654
+ type: "page";
3655
+ id: string;
3656
+ };
3657
+ authors: {
3658
+ id: string;
3659
+ type: "agent" | "bot" | "person";
3660
+ }[];
3661
+ } | {
3662
+ type: "page.transcription_block.transcript_deleted";
3663
+ timestamp: string;
3664
+ id: string;
3665
+ data: {
3666
+ target: {
3667
+ id: string;
3668
+ type: "block" | "page" | "database";
3669
+ };
3670
+ transcriptId: string | null;
3671
+ };
3672
+ workspaceId: string;
3673
+ workspaceName: string;
3674
+ subscriptionId: string;
3675
+ integrationId: string;
3676
+ attemptNumber: number;
3677
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3678
+ accessibleBy?: ({
3679
+ id: string;
3680
+ type: "person";
3681
+ } | {
3682
+ id: string;
3683
+ type: "bot";
3684
+ })[] | undefined;
3685
+ entity: {
3686
+ type: "page";
3687
+ id: string;
3688
+ };
3689
+ authors: {
3690
+ id: string;
3691
+ type: "agent" | "bot" | "person";
3692
+ }[];
3693
+ } | {
3694
+ type: "page.undeleted";
3695
+ timestamp: string;
3696
+ id: string;
3697
+ data: {
3698
+ parent: {
3699
+ id: string;
3700
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3701
+ dataSourceId?: string | undefined;
3702
+ };
3703
+ };
3704
+ workspaceId: string;
3705
+ workspaceName: string;
3706
+ subscriptionId: string;
3707
+ integrationId: string;
3708
+ attemptNumber: number;
3709
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3710
+ accessibleBy?: ({
3711
+ id: string;
3712
+ type: "person";
3713
+ } | {
3714
+ id: string;
3715
+ type: "bot";
3716
+ })[] | undefined;
3717
+ entity: {
3718
+ type: "page";
3719
+ id: string;
3720
+ };
3721
+ authors: {
3722
+ id: string;
3723
+ type: "agent" | "bot" | "person";
3724
+ }[];
3725
+ } | {
3726
+ type: "page.unlocked";
3727
+ timestamp: string;
3728
+ id: string;
3729
+ data: {
3730
+ parent: {
3731
+ id: string;
3732
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3733
+ dataSourceId?: string | undefined;
3734
+ };
3735
+ };
3736
+ workspaceId: string;
3737
+ workspaceName: string;
3738
+ subscriptionId: string;
3739
+ integrationId: string;
3740
+ attemptNumber: number;
3741
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3742
+ accessibleBy?: ({
3743
+ id: string;
3744
+ type: "person";
3745
+ } | {
3746
+ id: string;
3747
+ type: "bot";
3748
+ })[] | undefined;
3749
+ entity: {
3750
+ type: "page";
3751
+ id: string;
3752
+ };
3753
+ authors: {
3754
+ id: string;
3755
+ type: "agent" | "bot" | "person";
3756
+ }[];
3757
+ } | {
3758
+ type: "view.created";
3759
+ timestamp: string;
3760
+ id: string;
3761
+ data: {
3762
+ parent: {
3763
+ id: string;
3764
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3765
+ dataSourceId?: string | undefined;
3766
+ };
3767
+ viewType: string;
3768
+ };
3769
+ workspaceId: string;
3770
+ workspaceName: string;
3771
+ subscriptionId: string;
3772
+ integrationId: string;
3773
+ attemptNumber: number;
3774
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3775
+ accessibleBy?: ({
3776
+ id: string;
3777
+ type: "person";
3778
+ } | {
3779
+ id: string;
3780
+ type: "bot";
3781
+ })[] | undefined;
3782
+ entity: {
3783
+ id: string;
3784
+ type: "view";
3785
+ };
3786
+ authors: {
3787
+ id: string;
3788
+ type: "agent" | "bot" | "person";
3789
+ }[];
3790
+ } | {
3791
+ type: "view.deleted";
3792
+ timestamp: string;
3793
+ id: string;
3794
+ data: {
3795
+ parent: {
3796
+ id: string;
3797
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3798
+ dataSourceId?: string | undefined;
3799
+ };
3800
+ };
3801
+ workspaceId: string;
3802
+ workspaceName: string;
3803
+ subscriptionId: string;
3804
+ integrationId: string;
3805
+ attemptNumber: number;
3806
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3807
+ accessibleBy?: ({
3808
+ id: string;
3809
+ type: "person";
3810
+ } | {
3811
+ id: string;
3812
+ type: "bot";
3813
+ })[] | undefined;
3814
+ entity: {
3815
+ id: string;
3816
+ type: "view";
3817
+ };
3818
+ authors: {
3819
+ id: string;
3820
+ type: "agent" | "bot" | "person";
3821
+ }[];
3822
+ } | {
3823
+ type: "view.updated";
3824
+ timestamp: string;
3825
+ id: string;
3826
+ data: {
3827
+ parent: {
3828
+ id: string;
3829
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3830
+ dataSourceId?: string | undefined;
3831
+ };
3832
+ updatedFields: ("filter" | "name" | "sorts" | "configuration")[];
3833
+ };
3834
+ workspaceId: string;
3835
+ workspaceName: string;
3836
+ subscriptionId: string;
3837
+ integrationId: string;
3838
+ attemptNumber: number;
3839
+ apiVersion: "2022-06-28" | "2025-09-03" | "2026-03-11";
3840
+ accessibleBy?: ({
3841
+ id: string;
3842
+ type: "person";
3843
+ } | {
3844
+ id: string;
3845
+ type: "bot";
3846
+ })[] | undefined;
3847
+ entity: {
3848
+ id: string;
3849
+ type: "view";
3850
+ };
3851
+ authors: {
3852
+ id: string;
3853
+ type: "agent" | "bot" | "person";
3854
+ }[];
3855
+ }, {
3856
+ [x: string]: z.core.util.JSONType;
3857
+ data: {
3858
+ page_id: string;
3859
+ parent: {
3860
+ id: string;
3861
+ type: "block" | "page" | "database";
3862
+ };
3863
+ };
3864
+ entity: {
3865
+ id: string;
3866
+ type: "comment";
3867
+ };
3868
+ type: "comment.created";
3869
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
3870
+ attempt_number: number;
3871
+ authors: ({
3872
+ id: string;
3873
+ type: "person";
3874
+ } | {
3875
+ id: string;
3876
+ type: "bot";
3877
+ } | {
3878
+ id: string;
3879
+ type: "agent";
3880
+ })[];
3881
+ id: string;
3882
+ integration_id: string;
3883
+ subscription_id: string;
3884
+ timestamp: string;
3885
+ workspace_id: string;
3886
+ workspace_name: string;
3887
+ accessible_by?: ({
3888
+ id: string;
3889
+ type: "person";
3890
+ } | {
3891
+ id: string;
3892
+ type: "bot";
3893
+ })[] | undefined;
3894
+ } | {
3895
+ [x: string]: z.core.util.JSONType;
3896
+ data: {
3897
+ page_id: string;
3898
+ parent: {
3899
+ id: string;
3900
+ type: "block" | "page" | "database";
3901
+ };
3902
+ };
3903
+ entity: {
3904
+ id: string;
3905
+ type: "comment";
3906
+ };
3907
+ type: "comment.deleted";
3908
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
3909
+ attempt_number: number;
3910
+ authors: ({
3911
+ id: string;
3912
+ type: "person";
3913
+ } | {
3914
+ id: string;
3915
+ type: "bot";
3916
+ } | {
3917
+ id: string;
3918
+ type: "agent";
3919
+ })[];
3920
+ id: string;
3921
+ integration_id: string;
3922
+ subscription_id: string;
3923
+ timestamp: string;
3924
+ workspace_id: string;
3925
+ workspace_name: string;
3926
+ accessible_by?: ({
3927
+ id: string;
3928
+ type: "person";
3929
+ } | {
3930
+ id: string;
3931
+ type: "bot";
3932
+ })[] | undefined;
3933
+ } | {
3934
+ [x: string]: z.core.util.JSONType;
3935
+ data: {
3936
+ page_id: string;
3937
+ parent: {
3938
+ id: string;
3939
+ type: "block" | "page" | "database";
3940
+ };
3941
+ };
3942
+ entity: {
3943
+ id: string;
3944
+ type: "comment";
3945
+ };
3946
+ type: "comment.updated";
3947
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
3948
+ attempt_number: number;
3949
+ authors: ({
3950
+ id: string;
3951
+ type: "person";
3952
+ } | {
3953
+ id: string;
3954
+ type: "bot";
3955
+ } | {
3956
+ id: string;
3957
+ type: "agent";
3958
+ })[];
3959
+ id: string;
3960
+ integration_id: string;
3961
+ subscription_id: string;
3962
+ timestamp: string;
3963
+ workspace_id: string;
3964
+ workspace_name: string;
3965
+ accessible_by?: ({
3966
+ id: string;
3967
+ type: "person";
3968
+ } | {
3969
+ id: string;
3970
+ type: "bot";
3971
+ })[] | undefined;
3972
+ } | {
3973
+ [x: string]: z.core.util.JSONType;
3974
+ data: {
3975
+ parent: {
3976
+ id: string;
3977
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
3978
+ data_source_id?: string | undefined;
3979
+ };
3980
+ updated_blocks: {
3981
+ id: string;
3982
+ type: "block" | "page" | "database";
3983
+ }[];
3984
+ };
3985
+ entity: {
3986
+ id: string;
3987
+ type: "block" | "database" | "data_source";
3988
+ };
3989
+ type: "data_source.content_updated";
3990
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
3991
+ attempt_number: number;
3992
+ authors: ({
3993
+ id: string;
3994
+ type: "person";
3995
+ } | {
3996
+ id: string;
3997
+ type: "bot";
3998
+ } | {
3999
+ id: string;
4000
+ type: "agent";
4001
+ })[];
4002
+ id: string;
4003
+ integration_id: string;
4004
+ subscription_id: string;
4005
+ timestamp: string;
4006
+ workspace_id: string;
4007
+ workspace_name: string;
4008
+ accessible_by?: ({
4009
+ id: string;
4010
+ type: "person";
4011
+ } | {
4012
+ id: string;
4013
+ type: "bot";
4014
+ })[] | undefined;
4015
+ } | {
4016
+ [x: string]: z.core.util.JSONType;
4017
+ data: {
4018
+ parent: {
4019
+ id: string;
4020
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4021
+ data_source_id?: string | undefined;
4022
+ };
4023
+ };
4024
+ entity: {
4025
+ id: string;
4026
+ type: "block" | "database" | "data_source";
4027
+ };
4028
+ type: "data_source.created";
4029
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4030
+ attempt_number: number;
4031
+ authors: ({
4032
+ id: string;
4033
+ type: "person";
4034
+ } | {
4035
+ id: string;
4036
+ type: "bot";
4037
+ } | {
4038
+ id: string;
4039
+ type: "agent";
4040
+ })[];
4041
+ id: string;
4042
+ integration_id: string;
4043
+ subscription_id: string;
4044
+ timestamp: string;
4045
+ workspace_id: string;
4046
+ workspace_name: string;
4047
+ accessible_by?: ({
4048
+ id: string;
4049
+ type: "person";
4050
+ } | {
4051
+ id: string;
4052
+ type: "bot";
4053
+ })[] | undefined;
4054
+ } | {
4055
+ [x: string]: z.core.util.JSONType;
4056
+ data: {
4057
+ parent: {
4058
+ id: string;
4059
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4060
+ data_source_id?: string | undefined;
4061
+ };
4062
+ };
4063
+ entity: {
4064
+ id: string;
4065
+ type: "block" | "database" | "data_source";
4066
+ };
4067
+ type: "data_source.deleted";
4068
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4069
+ attempt_number: number;
4070
+ authors: ({
4071
+ id: string;
4072
+ type: "person";
4073
+ } | {
4074
+ id: string;
4075
+ type: "bot";
4076
+ } | {
4077
+ id: string;
4078
+ type: "agent";
4079
+ })[];
4080
+ id: string;
4081
+ integration_id: string;
4082
+ subscription_id: string;
4083
+ timestamp: string;
4084
+ workspace_id: string;
4085
+ workspace_name: string;
4086
+ accessible_by?: ({
4087
+ id: string;
4088
+ type: "person";
4089
+ } | {
4090
+ id: string;
4091
+ type: "bot";
4092
+ })[] | undefined;
4093
+ } | {
4094
+ [x: string]: z.core.util.JSONType;
4095
+ data: {
4096
+ parent: {
4097
+ id: string;
4098
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4099
+ data_source_id?: string | undefined;
4100
+ };
4101
+ };
4102
+ entity: {
4103
+ id: string;
4104
+ type: "block" | "database" | "data_source";
4105
+ };
4106
+ type: "data_source.moved";
4107
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4108
+ attempt_number: number;
4109
+ authors: ({
4110
+ id: string;
4111
+ type: "person";
4112
+ } | {
4113
+ id: string;
4114
+ type: "bot";
4115
+ } | {
4116
+ id: string;
4117
+ type: "agent";
4118
+ })[];
4119
+ id: string;
4120
+ integration_id: string;
4121
+ subscription_id: string;
4122
+ timestamp: string;
4123
+ workspace_id: string;
4124
+ workspace_name: string;
4125
+ accessible_by?: ({
4126
+ id: string;
4127
+ type: "person";
4128
+ } | {
4129
+ id: string;
4130
+ type: "bot";
4131
+ })[] | undefined;
4132
+ } | {
4133
+ [x: string]: z.core.util.JSONType;
4134
+ data: {
4135
+ parent: {
4136
+ id: string;
4137
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4138
+ data_source_id?: string | undefined;
4139
+ };
4140
+ updated_properties?: {
4141
+ action: "deleted" | "created" | "updated";
4142
+ id: string;
4143
+ name: string | null;
4144
+ }[] | undefined;
4145
+ };
4146
+ entity: {
4147
+ id: string;
4148
+ type: "block" | "database" | "data_source";
4149
+ };
4150
+ type: "data_source.schema_updated";
4151
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4152
+ attempt_number: number;
4153
+ authors: ({
4154
+ id: string;
4155
+ type: "person";
4156
+ } | {
4157
+ id: string;
4158
+ type: "bot";
4159
+ } | {
4160
+ id: string;
4161
+ type: "agent";
4162
+ })[];
4163
+ id: string;
4164
+ integration_id: string;
4165
+ subscription_id: string;
4166
+ timestamp: string;
4167
+ workspace_id: string;
4168
+ workspace_name: string;
4169
+ accessible_by?: ({
4170
+ id: string;
4171
+ type: "person";
4172
+ } | {
4173
+ id: string;
4174
+ type: "bot";
4175
+ })[] | undefined;
4176
+ } | {
4177
+ [x: string]: z.core.util.JSONType;
4178
+ data: {
4179
+ parent: {
4180
+ id: string;
4181
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4182
+ data_source_id?: string | undefined;
4183
+ };
4184
+ };
4185
+ entity: {
4186
+ id: string;
4187
+ type: "block" | "database" | "data_source";
4188
+ };
4189
+ type: "data_source.undeleted";
4190
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4191
+ attempt_number: number;
4192
+ authors: ({
4193
+ id: string;
4194
+ type: "person";
4195
+ } | {
4196
+ id: string;
4197
+ type: "bot";
4198
+ } | {
4199
+ id: string;
4200
+ type: "agent";
4201
+ })[];
4202
+ id: string;
4203
+ integration_id: string;
4204
+ subscription_id: string;
4205
+ timestamp: string;
4206
+ workspace_id: string;
4207
+ workspace_name: string;
4208
+ accessible_by?: ({
4209
+ id: string;
4210
+ type: "person";
4211
+ } | {
4212
+ id: string;
4213
+ type: "bot";
4214
+ })[] | undefined;
4215
+ } | {
4216
+ [x: string]: z.core.util.JSONType;
4217
+ data: {
4218
+ parent: {
4219
+ id: string;
4220
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4221
+ data_source_id?: string | undefined;
4222
+ };
4223
+ };
4224
+ entity: {
4225
+ id: string;
4226
+ type: "block" | "database" | "data_source";
4227
+ };
4228
+ type: "database.created";
4229
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4230
+ attempt_number: number;
4231
+ authors: ({
4232
+ id: string;
4233
+ type: "person";
4234
+ } | {
4235
+ id: string;
4236
+ type: "bot";
4237
+ } | {
4238
+ id: string;
4239
+ type: "agent";
4240
+ })[];
4241
+ id: string;
4242
+ integration_id: string;
4243
+ subscription_id: string;
4244
+ timestamp: string;
4245
+ workspace_id: string;
4246
+ workspace_name: string;
4247
+ accessible_by?: ({
4248
+ id: string;
4249
+ type: "person";
4250
+ } | {
4251
+ id: string;
4252
+ type: "bot";
4253
+ })[] | undefined;
4254
+ } | {
4255
+ [x: string]: z.core.util.JSONType;
4256
+ data: {
4257
+ parent: {
4258
+ id: string;
4259
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4260
+ data_source_id?: string | undefined;
4261
+ };
4262
+ };
4263
+ entity: {
4264
+ id: string;
4265
+ type: "block" | "database" | "data_source";
4266
+ };
4267
+ type: "database.deleted";
4268
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4269
+ attempt_number: number;
4270
+ authors: ({
4271
+ id: string;
4272
+ type: "person";
4273
+ } | {
4274
+ id: string;
4275
+ type: "bot";
4276
+ } | {
4277
+ id: string;
4278
+ type: "agent";
4279
+ })[];
4280
+ id: string;
4281
+ integration_id: string;
4282
+ subscription_id: string;
4283
+ timestamp: string;
4284
+ workspace_id: string;
4285
+ workspace_name: string;
4286
+ accessible_by?: ({
4287
+ id: string;
4288
+ type: "person";
4289
+ } | {
4290
+ id: string;
4291
+ type: "bot";
4292
+ })[] | undefined;
4293
+ } | {
4294
+ [x: string]: z.core.util.JSONType;
4295
+ data: {
4296
+ parent: {
4297
+ id: string;
4298
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4299
+ data_source_id?: string | undefined;
4300
+ };
4301
+ };
4302
+ entity: {
4303
+ id: string;
4304
+ type: "block" | "database" | "data_source";
4305
+ };
4306
+ type: "database.moved";
4307
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4308
+ attempt_number: number;
4309
+ authors: ({
4310
+ id: string;
4311
+ type: "person";
4312
+ } | {
4313
+ id: string;
4314
+ type: "bot";
4315
+ } | {
4316
+ id: string;
4317
+ type: "agent";
4318
+ })[];
4319
+ id: string;
4320
+ integration_id: string;
4321
+ subscription_id: string;
4322
+ timestamp: string;
4323
+ workspace_id: string;
4324
+ workspace_name: string;
4325
+ accessible_by?: ({
4326
+ id: string;
4327
+ type: "person";
4328
+ } | {
4329
+ id: string;
4330
+ type: "bot";
4331
+ })[] | undefined;
4332
+ } | {
4333
+ [x: string]: z.core.util.JSONType;
4334
+ data: {
4335
+ parent: {
4336
+ id: string;
4337
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4338
+ data_source_id?: string | undefined;
4339
+ };
4340
+ };
4341
+ entity: {
4342
+ id: string;
4343
+ type: "block" | "database" | "data_source";
4344
+ };
4345
+ type: "database.undeleted";
4346
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4347
+ attempt_number: number;
4348
+ authors: ({
4349
+ id: string;
4350
+ type: "person";
4351
+ } | {
4352
+ id: string;
4353
+ type: "bot";
4354
+ } | {
4355
+ id: string;
4356
+ type: "agent";
4357
+ })[];
4358
+ id: string;
4359
+ integration_id: string;
4360
+ subscription_id: string;
4361
+ timestamp: string;
4362
+ workspace_id: string;
4363
+ workspace_name: string;
4364
+ accessible_by?: ({
4365
+ id: string;
4366
+ type: "person";
4367
+ } | {
4368
+ id: string;
4369
+ type: "bot";
4370
+ })[] | undefined;
4371
+ } | {
4372
+ [x: string]: z.core.util.JSONType;
4373
+ entity: {
4374
+ id: string;
4375
+ type: "file_upload";
4376
+ };
4377
+ type: "file_upload.completed";
4378
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4379
+ attempt_number: number;
4380
+ authors: ({
4381
+ id: string;
4382
+ type: "person";
4383
+ } | {
4384
+ id: string;
4385
+ type: "bot";
4386
+ } | {
4387
+ id: string;
4388
+ type: "agent";
4389
+ })[];
4390
+ id: string;
4391
+ integration_id: string;
4392
+ subscription_id: string;
4393
+ timestamp: string;
4394
+ workspace_id: string;
4395
+ workspace_name: string;
4396
+ accessible_by?: ({
4397
+ id: string;
4398
+ type: "person";
4399
+ } | {
4400
+ id: string;
4401
+ type: "bot";
4402
+ })[] | undefined;
4403
+ } | {
4404
+ [x: string]: z.core.util.JSONType;
4405
+ entity: {
4406
+ id: string;
4407
+ type: "file_upload";
4408
+ };
4409
+ type: "file_upload.created";
4410
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4411
+ attempt_number: number;
4412
+ authors: ({
4413
+ id: string;
4414
+ type: "person";
4415
+ } | {
4416
+ id: string;
4417
+ type: "bot";
4418
+ } | {
4419
+ id: string;
4420
+ type: "agent";
4421
+ })[];
4422
+ id: string;
4423
+ integration_id: string;
4424
+ subscription_id: string;
4425
+ timestamp: string;
4426
+ workspace_id: string;
4427
+ workspace_name: string;
4428
+ accessible_by?: ({
4429
+ id: string;
4430
+ type: "person";
4431
+ } | {
4432
+ id: string;
4433
+ type: "bot";
4434
+ })[] | undefined;
4435
+ } | {
4436
+ [x: string]: z.core.util.JSONType;
4437
+ entity: {
4438
+ id: string;
4439
+ type: "file_upload";
4440
+ };
4441
+ type: "file_upload.expired";
4442
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4443
+ attempt_number: number;
4444
+ authors: ({
4445
+ id: string;
4446
+ type: "person";
4447
+ } | {
4448
+ id: string;
4449
+ type: "bot";
4450
+ } | {
4451
+ id: string;
4452
+ type: "agent";
4453
+ })[];
4454
+ id: string;
4455
+ integration_id: string;
4456
+ subscription_id: string;
4457
+ timestamp: string;
4458
+ workspace_id: string;
4459
+ workspace_name: string;
4460
+ accessible_by?: ({
4461
+ id: string;
4462
+ type: "person";
4463
+ } | {
4464
+ id: string;
4465
+ type: "bot";
4466
+ })[] | undefined;
4467
+ } | {
4468
+ [x: string]: z.core.util.JSONType;
4469
+ data: {
4470
+ file_import_result: {
4471
+ imported_time: string;
4472
+ success: Record<string, never>;
4473
+ type: "success";
4474
+ } | {
4475
+ error: {
4476
+ code: string;
4477
+ message: string;
4478
+ parameter: string | null;
4479
+ status_code: number | null;
4480
+ type: "validation_error" | "internal_system_error" | "download_error" | "upload_error";
4481
+ };
4482
+ imported_time: string;
4483
+ type: "error";
4484
+ };
4485
+ };
4486
+ entity: {
4487
+ id: string;
4488
+ type: "file_upload";
4489
+ };
4490
+ type: "file_upload.upload_failed";
4491
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4492
+ attempt_number: number;
4493
+ authors: ({
4494
+ id: string;
4495
+ type: "person";
4496
+ } | {
4497
+ id: string;
4498
+ type: "bot";
4499
+ } | {
4500
+ id: string;
4501
+ type: "agent";
4502
+ })[];
4503
+ id: string;
4504
+ integration_id: string;
4505
+ subscription_id: string;
4506
+ timestamp: string;
4507
+ workspace_id: string;
4508
+ workspace_name: string;
4509
+ accessible_by?: ({
4510
+ id: string;
4511
+ type: "person";
4512
+ } | {
4513
+ id: string;
4514
+ type: "bot";
4515
+ })[] | undefined;
4516
+ } | {
4517
+ [x: string]: z.core.util.JSONType;
4518
+ data: {
4519
+ parent: {
4520
+ id: string;
4521
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4522
+ data_source_id?: string | undefined;
4523
+ };
4524
+ updated_blocks: {
4525
+ id: string;
4526
+ type: "block" | "page" | "database";
4527
+ }[];
4528
+ };
4529
+ entity: {
4530
+ id: string;
4531
+ type: "page";
4532
+ };
4533
+ type: "page.content_updated";
4534
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4535
+ attempt_number: number;
4536
+ authors: ({
4537
+ id: string;
4538
+ type: "person";
4539
+ } | {
4540
+ id: string;
4541
+ type: "bot";
4542
+ } | {
4543
+ id: string;
4544
+ type: "agent";
4545
+ })[];
4546
+ id: string;
4547
+ integration_id: string;
4548
+ subscription_id: string;
4549
+ timestamp: string;
4550
+ workspace_id: string;
4551
+ workspace_name: string;
4552
+ accessible_by?: ({
4553
+ id: string;
4554
+ type: "person";
4555
+ } | {
4556
+ id: string;
4557
+ type: "bot";
4558
+ })[] | undefined;
4559
+ } | {
4560
+ [x: string]: z.core.util.JSONType;
4561
+ data: {
4562
+ parent: {
4563
+ id: string;
4564
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4565
+ data_source_id?: string | undefined;
4566
+ };
4567
+ };
4568
+ entity: {
4569
+ id: string;
4570
+ type: "page";
4571
+ };
4572
+ type: "page.created";
4573
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4574
+ attempt_number: number;
4575
+ authors: ({
4576
+ id: string;
4577
+ type: "person";
4578
+ } | {
4579
+ id: string;
4580
+ type: "bot";
4581
+ } | {
4582
+ id: string;
4583
+ type: "agent";
4584
+ })[];
4585
+ id: string;
4586
+ integration_id: string;
4587
+ subscription_id: string;
4588
+ timestamp: string;
4589
+ workspace_id: string;
4590
+ workspace_name: string;
4591
+ accessible_by?: ({
4592
+ id: string;
4593
+ type: "person";
4594
+ } | {
4595
+ id: string;
4596
+ type: "bot";
4597
+ })[] | undefined;
4598
+ } | {
4599
+ [x: string]: z.core.util.JSONType;
4600
+ data: {
4601
+ parent: {
4602
+ id: string;
4603
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4604
+ data_source_id?: string | undefined;
4605
+ };
4606
+ };
4607
+ entity: {
4608
+ id: string;
4609
+ type: "page";
4610
+ };
4611
+ type: "page.deleted";
4612
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4613
+ attempt_number: number;
4614
+ authors: ({
4615
+ id: string;
4616
+ type: "person";
4617
+ } | {
4618
+ id: string;
4619
+ type: "bot";
4620
+ } | {
4621
+ id: string;
4622
+ type: "agent";
4623
+ })[];
4624
+ id: string;
4625
+ integration_id: string;
4626
+ subscription_id: string;
4627
+ timestamp: string;
4628
+ workspace_id: string;
4629
+ workspace_name: string;
4630
+ accessible_by?: ({
4631
+ id: string;
4632
+ type: "person";
4633
+ } | {
4634
+ id: string;
4635
+ type: "bot";
4636
+ })[] | undefined;
4637
+ } | {
4638
+ [x: string]: z.core.util.JSONType;
4639
+ data: {
4640
+ parent: {
4641
+ id: string;
4642
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4643
+ data_source_id?: string | undefined;
4644
+ };
4645
+ };
4646
+ entity: {
4647
+ id: string;
4648
+ type: "page";
4649
+ };
4650
+ type: "page.locked";
4651
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4652
+ attempt_number: number;
4653
+ authors: ({
4654
+ id: string;
4655
+ type: "person";
4656
+ } | {
4657
+ id: string;
4658
+ type: "bot";
4659
+ } | {
4660
+ id: string;
4661
+ type: "agent";
4662
+ })[];
4663
+ id: string;
4664
+ integration_id: string;
4665
+ subscription_id: string;
4666
+ timestamp: string;
4667
+ workspace_id: string;
4668
+ workspace_name: string;
4669
+ accessible_by?: ({
4670
+ id: string;
4671
+ type: "person";
4672
+ } | {
4673
+ id: string;
4674
+ type: "bot";
4675
+ })[] | undefined;
4676
+ } | {
4677
+ [x: string]: z.core.util.JSONType;
4678
+ data: {
4679
+ parent: {
4680
+ id: string;
4681
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4682
+ data_source_id?: string | undefined;
4683
+ };
4684
+ };
4685
+ entity: {
4686
+ id: string;
4687
+ type: "page";
4688
+ };
4689
+ type: "page.moved";
4690
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4691
+ attempt_number: number;
4692
+ authors: ({
4693
+ id: string;
4694
+ type: "person";
4695
+ } | {
4696
+ id: string;
4697
+ type: "bot";
4698
+ } | {
4699
+ id: string;
4700
+ type: "agent";
4701
+ })[];
4702
+ id: string;
4703
+ integration_id: string;
4704
+ subscription_id: string;
4705
+ timestamp: string;
4706
+ workspace_id: string;
4707
+ workspace_name: string;
4708
+ accessible_by?: ({
4709
+ id: string;
4710
+ type: "person";
4711
+ } | {
4712
+ id: string;
4713
+ type: "bot";
4714
+ })[] | undefined;
4715
+ } | {
4716
+ [x: string]: z.core.util.JSONType;
4717
+ data: {
4718
+ parent: {
4719
+ id: string;
4720
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4721
+ data_source_id?: string | undefined;
4722
+ };
4723
+ updated_properties: string[];
4724
+ };
4725
+ entity: {
4726
+ id: string;
4727
+ type: "page";
4728
+ };
4729
+ type: "page.properties_updated";
4730
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4731
+ attempt_number: number;
4732
+ authors: ({
4733
+ id: string;
4734
+ type: "person";
4735
+ } | {
4736
+ id: string;
4737
+ type: "bot";
4738
+ } | {
4739
+ id: string;
4740
+ type: "agent";
4741
+ })[];
4742
+ id: string;
4743
+ integration_id: string;
4744
+ subscription_id: string;
4745
+ timestamp: string;
4746
+ workspace_id: string;
4747
+ workspace_name: string;
4748
+ accessible_by?: ({
4749
+ id: string;
4750
+ type: "person";
4751
+ } | {
4752
+ id: string;
4753
+ type: "bot";
4754
+ })[] | undefined;
4755
+ } | {
4756
+ [x: string]: z.core.util.JSONType;
4757
+ data: {
4758
+ target: {
4759
+ id: string;
4760
+ type: "block" | "page" | "database";
4761
+ };
4762
+ transcript_id: string | null;
4763
+ };
4764
+ entity: {
4765
+ id: string;
4766
+ type: "page";
4767
+ };
4768
+ type: "page.transcription_block.transcript_deleted";
4769
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4770
+ attempt_number: number;
4771
+ authors: ({
4772
+ id: string;
4773
+ type: "person";
4774
+ } | {
4775
+ id: string;
4776
+ type: "bot";
4777
+ } | {
4778
+ id: string;
4779
+ type: "agent";
4780
+ })[];
4781
+ id: string;
4782
+ integration_id: string;
4783
+ subscription_id: string;
4784
+ timestamp: string;
4785
+ workspace_id: string;
4786
+ workspace_name: string;
4787
+ accessible_by?: ({
4788
+ id: string;
4789
+ type: "person";
4790
+ } | {
4791
+ id: string;
4792
+ type: "bot";
4793
+ })[] | undefined;
4794
+ } | {
4795
+ [x: string]: z.core.util.JSONType;
4796
+ data: {
4797
+ parent: {
4798
+ id: string;
4799
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4800
+ data_source_id?: string | undefined;
4801
+ };
4802
+ };
4803
+ entity: {
4804
+ id: string;
4805
+ type: "page";
4806
+ };
4807
+ type: "page.undeleted";
4808
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4809
+ attempt_number: number;
4810
+ authors: ({
4811
+ id: string;
4812
+ type: "person";
4813
+ } | {
4814
+ id: string;
4815
+ type: "bot";
4816
+ } | {
4817
+ id: string;
4818
+ type: "agent";
4819
+ })[];
4820
+ id: string;
4821
+ integration_id: string;
4822
+ subscription_id: string;
4823
+ timestamp: string;
4824
+ workspace_id: string;
4825
+ workspace_name: string;
4826
+ accessible_by?: ({
4827
+ id: string;
4828
+ type: "person";
4829
+ } | {
4830
+ id: string;
4831
+ type: "bot";
4832
+ })[] | undefined;
4833
+ } | {
4834
+ [x: string]: z.core.util.JSONType;
4835
+ data: {
4836
+ parent: {
4837
+ id: string;
4838
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4839
+ data_source_id?: string | undefined;
4840
+ };
4841
+ };
4842
+ entity: {
4843
+ id: string;
4844
+ type: "page";
4845
+ };
4846
+ type: "page.unlocked";
4847
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4848
+ attempt_number: number;
4849
+ authors: ({
4850
+ id: string;
4851
+ type: "person";
4852
+ } | {
4853
+ id: string;
4854
+ type: "bot";
4855
+ } | {
4856
+ id: string;
4857
+ type: "agent";
4858
+ })[];
4859
+ id: string;
4860
+ integration_id: string;
4861
+ subscription_id: string;
4862
+ timestamp: string;
4863
+ workspace_id: string;
4864
+ workspace_name: string;
4865
+ accessible_by?: ({
4866
+ id: string;
4867
+ type: "person";
4868
+ } | {
4869
+ id: string;
4870
+ type: "bot";
4871
+ })[] | undefined;
4872
+ } | {
4873
+ [x: string]: z.core.util.JSONType;
4874
+ data: {
4875
+ parent: {
4876
+ id: string;
4877
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4878
+ data_source_id?: string | undefined;
4879
+ };
4880
+ view_type: string;
4881
+ };
4882
+ entity: {
4883
+ id: string;
4884
+ type: "view";
4885
+ };
4886
+ type: "view.created";
4887
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4888
+ attempt_number: number;
4889
+ authors: ({
4890
+ id: string;
4891
+ type: "person";
4892
+ } | {
4893
+ id: string;
4894
+ type: "bot";
4895
+ } | {
4896
+ id: string;
4897
+ type: "agent";
4898
+ })[];
4899
+ id: string;
4900
+ integration_id: string;
4901
+ subscription_id: string;
4902
+ timestamp: string;
4903
+ workspace_id: string;
4904
+ workspace_name: string;
4905
+ accessible_by?: ({
4906
+ id: string;
4907
+ type: "person";
4908
+ } | {
4909
+ id: string;
4910
+ type: "bot";
4911
+ })[] | undefined;
4912
+ } | {
4913
+ [x: string]: z.core.util.JSONType;
4914
+ data: {
4915
+ parent: {
4916
+ id: string;
4917
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4918
+ data_source_id?: string | undefined;
4919
+ };
4920
+ };
4921
+ entity: {
4922
+ id: string;
4923
+ type: "view";
4924
+ };
4925
+ type: "view.deleted";
4926
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4927
+ attempt_number: number;
4928
+ authors: ({
4929
+ id: string;
4930
+ type: "person";
4931
+ } | {
4932
+ id: string;
4933
+ type: "bot";
4934
+ } | {
4935
+ id: string;
4936
+ type: "agent";
4937
+ })[];
4938
+ id: string;
4939
+ integration_id: string;
4940
+ subscription_id: string;
4941
+ timestamp: string;
4942
+ workspace_id: string;
4943
+ workspace_name: string;
4944
+ accessible_by?: ({
4945
+ id: string;
4946
+ type: "person";
4947
+ } | {
4948
+ id: string;
4949
+ type: "bot";
4950
+ })[] | undefined;
4951
+ } | {
4952
+ [x: string]: z.core.util.JSONType;
4953
+ data: {
4954
+ parent: {
4955
+ id: string;
4956
+ type: "team" | "space" | "agent" | "block" | "page" | "database";
4957
+ data_source_id?: string | undefined;
4958
+ };
4959
+ updated_fields: ("filter" | "name" | "sorts" | "configuration")[];
4960
+ };
4961
+ entity: {
4962
+ id: string;
4963
+ type: "view";
4964
+ };
4965
+ type: "view.updated";
4966
+ api_version: "2022-06-28" | "2025-09-03" | "2026-03-11";
4967
+ attempt_number: number;
4968
+ authors: ({
4969
+ id: string;
4970
+ type: "person";
4971
+ } | {
4972
+ id: string;
4973
+ type: "bot";
4974
+ } | {
4975
+ id: string;
4976
+ type: "agent";
4977
+ })[];
4978
+ id: string;
4979
+ integration_id: string;
4980
+ subscription_id: string;
4981
+ timestamp: string;
4982
+ workspace_id: string;
4983
+ workspace_name: string;
4984
+ accessible_by?: ({
4985
+ id: string;
4986
+ type: "person";
4987
+ } | {
4988
+ id: string;
4989
+ type: "bot";
4990
+ })[] | undefined;
4991
+ }>>;
4992
+ /** Validates an already-normalized Notion webhook event for trigger delivery. */
4993
+ export declare const NOTION_PUBLIC_EVENT_SCHEMA: z.ZodCustom<NotionWebhookEvent, NotionWebhookEvent>;
2912
4994
  /**
2913
4995
  * Runtime schema for one semantic Notion webhook event.
2914
4996
  *