@automate.ax/integration-contracts 0.160.0 → 0.163.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.
- package/LICENSE +21 -0
- package/dist/meta-ads/events.d.ts +298 -1
- package/dist/meta-ads/events.js +402 -35
- package/dist/meta-ads/index.d.ts +1 -0
- package/dist/meta-ads/index.js +1 -0
- package/dist/meta-ads/pages.d.ts +34 -0
- package/dist/meta-ads/pages.js +79 -0
- package/dist/meta-ads/schemas.d.ts +86 -2
- package/dist/meta-ads/schemas.js +74 -1
- package/dist/outlook/graph.d.ts +20 -2
- package/dist/outlook/graph.js +26 -3
- package/package.json +5 -12
- package/src/meta-ads/events.ts +475 -34
- package/src/meta-ads/index.ts +1 -0
- package/src/meta-ads/pages.ts +98 -0
- package/src/meta-ads/schemas.ts +83 -1
- package/src/outlook/graph.ts +32 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zach Sents
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -106,6 +106,126 @@ export declare const META_ADS_LEAD_CREATED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
106
106
|
leadgenId: z.ZodString;
|
|
107
107
|
pageId: z.ZodString;
|
|
108
108
|
}, z.core.$strip>;
|
|
109
|
+
export declare const META_ADS_PAGE_COMMENT_CREATED_EVENT_SCHEMA: z.ZodObject<{
|
|
110
|
+
commentId: z.ZodString;
|
|
111
|
+
createdTime: z.ZodNumber;
|
|
112
|
+
from: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
name: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
message: z.ZodOptional<z.ZodString>;
|
|
117
|
+
pageId: z.ZodString;
|
|
118
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
119
|
+
photo: z.ZodOptional<z.ZodString>;
|
|
120
|
+
post: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
id: z.ZodOptional<z.ZodString>;
|
|
122
|
+
isPublished: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
124
|
+
promotionStatus: z.ZodOptional<z.ZodString>;
|
|
125
|
+
statusType: z.ZodOptional<z.ZodString>;
|
|
126
|
+
updatedTime: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
postId: z.ZodString;
|
|
129
|
+
video: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export declare const META_ADS_MESSENGER_MESSAGE_RECEIVED_EVENT_SCHEMA: z.ZodObject<{
|
|
132
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
133
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
134
|
+
type: z.ZodString;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
messageId: z.ZodString;
|
|
137
|
+
quickReplyPayload: z.ZodOptional<z.ZodString>;
|
|
138
|
+
recipientId: z.ZodString;
|
|
139
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
adsContextData: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
143
|
+
flowId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
145
|
+
postId: z.ZodOptional<z.ZodString>;
|
|
146
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
147
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
150
|
+
source: z.ZodOptional<z.ZodString>;
|
|
151
|
+
type: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
senderId: z.ZodString;
|
|
154
|
+
text: z.ZodOptional<z.ZodString>;
|
|
155
|
+
timestamp: z.ZodNumber;
|
|
156
|
+
pageId: z.ZodString;
|
|
157
|
+
replyToMessageId: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export declare const META_ADS_INSTAGRAM_COMMENT_CREATED_EVENT_SCHEMA: z.ZodObject<{
|
|
160
|
+
commentId: z.ZodString;
|
|
161
|
+
from: z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
username: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
instagramAccountId: z.ZodString;
|
|
166
|
+
media: z.ZodObject<{
|
|
167
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
169
|
+
id: z.ZodString;
|
|
170
|
+
mediaProductType: z.ZodOptional<z.ZodString>;
|
|
171
|
+
originalMediaId: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
occurredAt: z.ZodNumber;
|
|
174
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
175
|
+
text: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export declare const META_ADS_INSTAGRAM_MENTION_CREATED_EVENT_SCHEMA: z.ZodObject<{
|
|
178
|
+
commentId: z.ZodOptional<z.ZodString>;
|
|
179
|
+
instagramAccountId: z.ZodString;
|
|
180
|
+
kind: z.ZodEnum<{
|
|
181
|
+
comment: "comment";
|
|
182
|
+
caption: "caption";
|
|
183
|
+
}>;
|
|
184
|
+
mediaId: z.ZodString;
|
|
185
|
+
occurredAt: z.ZodNumber;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export declare const META_ADS_INSTAGRAM_MESSAGE_RECEIVED_EVENT_SCHEMA: z.ZodObject<{
|
|
188
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
189
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
190
|
+
type: z.ZodString;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
messageId: z.ZodString;
|
|
193
|
+
quickReplyPayload: z.ZodOptional<z.ZodString>;
|
|
194
|
+
recipientId: z.ZodString;
|
|
195
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
197
|
+
adsContextData: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
199
|
+
flowId: z.ZodOptional<z.ZodString>;
|
|
200
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
201
|
+
postId: z.ZodOptional<z.ZodString>;
|
|
202
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
203
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
206
|
+
source: z.ZodOptional<z.ZodString>;
|
|
207
|
+
type: z.ZodOptional<z.ZodString>;
|
|
208
|
+
}, z.core.$strip>>;
|
|
209
|
+
senderId: z.ZodString;
|
|
210
|
+
text: z.ZodOptional<z.ZodString>;
|
|
211
|
+
timestamp: z.ZodNumber;
|
|
212
|
+
instagramAccountId: z.ZodString;
|
|
213
|
+
isUnsupported: z.ZodBoolean;
|
|
214
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
216
|
+
story: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
linkStickerUrl: z.ZodOptional<z.ZodString>;
|
|
219
|
+
url: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
export declare const META_ADS_INSTAGRAM_MESSAGE_DELETED_EVENT_SCHEMA: z.ZodObject<{
|
|
224
|
+
instagramAccountId: z.ZodString;
|
|
225
|
+
messageId: z.ZodString;
|
|
226
|
+
senderId: z.ZodString;
|
|
227
|
+
timestamp: z.ZodNumber;
|
|
228
|
+
}, z.core.$strip>;
|
|
109
229
|
export declare const META_ADS_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
|
|
110
230
|
account: z.ZodOptional<z.ZodString>;
|
|
111
231
|
adAccountId: z.ZodString;
|
|
@@ -114,9 +234,23 @@ export declare const META_ADS_LEAD_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
114
234
|
account: z.ZodOptional<z.ZodString>;
|
|
115
235
|
pageId: z.ZodString;
|
|
116
236
|
}, z.core.$strip>;
|
|
237
|
+
export declare const META_ADS_PAGE_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
|
|
238
|
+
account: z.ZodOptional<z.ZodString>;
|
|
239
|
+
pageId: z.ZodString;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const META_ADS_INSTAGRAM_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
|
|
242
|
+
account: z.ZodOptional<z.ZodString>;
|
|
243
|
+
instagramAccountId: z.ZodString;
|
|
244
|
+
}, z.core.$strip>;
|
|
117
245
|
export interface NormalizedMetaAdsWebhook {
|
|
118
246
|
adAccountEvents: z.output<typeof META_ADS_EVENT_SCHEMA>[];
|
|
247
|
+
instagramCommentEvents: z.output<typeof META_ADS_INSTAGRAM_COMMENT_CREATED_EVENT_SCHEMA>[];
|
|
248
|
+
instagramMentionEvents: z.output<typeof META_ADS_INSTAGRAM_MENTION_CREATED_EVENT_SCHEMA>[];
|
|
249
|
+
instagramMessageDeletedEvents: z.output<typeof META_ADS_INSTAGRAM_MESSAGE_DELETED_EVENT_SCHEMA>[];
|
|
250
|
+
instagramMessageEvents: z.output<typeof META_ADS_INSTAGRAM_MESSAGE_RECEIVED_EVENT_SCHEMA>[];
|
|
119
251
|
leadEvents: z.output<typeof META_ADS_LEAD_CREATED_EVENT_SCHEMA>[];
|
|
252
|
+
messengerMessageEvents: z.output<typeof META_ADS_MESSENGER_MESSAGE_RECEIVED_EVENT_SCHEMA>[];
|
|
253
|
+
pageCommentEvents: z.output<typeof META_ADS_PAGE_COMMENT_CREATED_EVENT_SCHEMA>[];
|
|
120
254
|
}
|
|
121
255
|
export declare const metaAdsTriggerContracts: {
|
|
122
256
|
readonly "meta-ads.ad.effectiveStatusChanged": {
|
|
@@ -299,6 +433,100 @@ export declare const metaAdsTriggerContracts: {
|
|
|
299
433
|
}, z.core.$strip>;
|
|
300
434
|
}, z.core.$strip>;
|
|
301
435
|
};
|
|
436
|
+
readonly "meta-ads.instagramComment.created": {
|
|
437
|
+
readonly configSchema: z.ZodObject<{
|
|
438
|
+
account: z.ZodOptional<z.ZodString>;
|
|
439
|
+
instagramAccountId: z.ZodString;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
readonly eventSchema: z.ZodObject<{
|
|
442
|
+
commentId: z.ZodString;
|
|
443
|
+
from: z.ZodObject<{
|
|
444
|
+
id: z.ZodString;
|
|
445
|
+
username: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
instagramAccountId: z.ZodString;
|
|
448
|
+
media: z.ZodObject<{
|
|
449
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
450
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
451
|
+
id: z.ZodString;
|
|
452
|
+
mediaProductType: z.ZodOptional<z.ZodString>;
|
|
453
|
+
originalMediaId: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
occurredAt: z.ZodNumber;
|
|
456
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
457
|
+
text: z.ZodOptional<z.ZodString>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
};
|
|
460
|
+
readonly "meta-ads.instagramMention.created": {
|
|
461
|
+
readonly configSchema: z.ZodObject<{
|
|
462
|
+
account: z.ZodOptional<z.ZodString>;
|
|
463
|
+
instagramAccountId: z.ZodString;
|
|
464
|
+
}, z.core.$strip>;
|
|
465
|
+
readonly eventSchema: z.ZodObject<{
|
|
466
|
+
commentId: z.ZodOptional<z.ZodString>;
|
|
467
|
+
instagramAccountId: z.ZodString;
|
|
468
|
+
kind: z.ZodEnum<{
|
|
469
|
+
comment: "comment";
|
|
470
|
+
caption: "caption";
|
|
471
|
+
}>;
|
|
472
|
+
mediaId: z.ZodString;
|
|
473
|
+
occurredAt: z.ZodNumber;
|
|
474
|
+
}, z.core.$strip>;
|
|
475
|
+
};
|
|
476
|
+
readonly "meta-ads.instagramMessage.deleted": {
|
|
477
|
+
readonly configSchema: z.ZodObject<{
|
|
478
|
+
account: z.ZodOptional<z.ZodString>;
|
|
479
|
+
instagramAccountId: z.ZodString;
|
|
480
|
+
}, z.core.$strip>;
|
|
481
|
+
readonly eventSchema: z.ZodObject<{
|
|
482
|
+
instagramAccountId: z.ZodString;
|
|
483
|
+
messageId: z.ZodString;
|
|
484
|
+
senderId: z.ZodString;
|
|
485
|
+
timestamp: z.ZodNumber;
|
|
486
|
+
}, z.core.$strip>;
|
|
487
|
+
};
|
|
488
|
+
readonly "meta-ads.instagramMessage.received": {
|
|
489
|
+
readonly configSchema: z.ZodObject<{
|
|
490
|
+
account: z.ZodOptional<z.ZodString>;
|
|
491
|
+
instagramAccountId: z.ZodString;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
readonly eventSchema: z.ZodObject<{
|
|
494
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
495
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
496
|
+
type: z.ZodString;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
messageId: z.ZodString;
|
|
499
|
+
quickReplyPayload: z.ZodOptional<z.ZodString>;
|
|
500
|
+
recipientId: z.ZodString;
|
|
501
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
502
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
503
|
+
adsContextData: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
505
|
+
flowId: z.ZodOptional<z.ZodString>;
|
|
506
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
507
|
+
postId: z.ZodOptional<z.ZodString>;
|
|
508
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
509
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
510
|
+
}, z.core.$strip>>;
|
|
511
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
512
|
+
source: z.ZodOptional<z.ZodString>;
|
|
513
|
+
type: z.ZodOptional<z.ZodString>;
|
|
514
|
+
}, z.core.$strip>>;
|
|
515
|
+
senderId: z.ZodString;
|
|
516
|
+
text: z.ZodOptional<z.ZodString>;
|
|
517
|
+
timestamp: z.ZodNumber;
|
|
518
|
+
instagramAccountId: z.ZodString;
|
|
519
|
+
isUnsupported: z.ZodBoolean;
|
|
520
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
522
|
+
story: z.ZodOptional<z.ZodObject<{
|
|
523
|
+
id: z.ZodString;
|
|
524
|
+
linkStickerUrl: z.ZodOptional<z.ZodString>;
|
|
525
|
+
url: z.ZodOptional<z.ZodString>;
|
|
526
|
+
}, z.core.$strip>>;
|
|
527
|
+
}, z.core.$strip>>;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
};
|
|
302
530
|
readonly "meta-ads.insights.updated": {
|
|
303
531
|
readonly configSchema: z.ZodObject<{
|
|
304
532
|
account: z.ZodOptional<z.ZodString>;
|
|
@@ -336,6 +564,40 @@ export declare const metaAdsTriggerContracts: {
|
|
|
336
564
|
pageId: z.ZodString;
|
|
337
565
|
}, z.core.$strip>;
|
|
338
566
|
};
|
|
567
|
+
readonly "meta-ads.messengerMessage.received": {
|
|
568
|
+
readonly configSchema: z.ZodObject<{
|
|
569
|
+
account: z.ZodOptional<z.ZodString>;
|
|
570
|
+
pageId: z.ZodString;
|
|
571
|
+
}, z.core.$strip>;
|
|
572
|
+
readonly eventSchema: z.ZodObject<{
|
|
573
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
574
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
575
|
+
type: z.ZodString;
|
|
576
|
+
}, z.core.$strip>>;
|
|
577
|
+
messageId: z.ZodString;
|
|
578
|
+
quickReplyPayload: z.ZodOptional<z.ZodString>;
|
|
579
|
+
recipientId: z.ZodString;
|
|
580
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
581
|
+
adId: z.ZodOptional<z.ZodString>;
|
|
582
|
+
adsContextData: z.ZodOptional<z.ZodObject<{
|
|
583
|
+
adTitle: z.ZodOptional<z.ZodString>;
|
|
584
|
+
flowId: z.ZodOptional<z.ZodString>;
|
|
585
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
586
|
+
postId: z.ZodOptional<z.ZodString>;
|
|
587
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
588
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>>;
|
|
590
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
591
|
+
source: z.ZodOptional<z.ZodString>;
|
|
592
|
+
type: z.ZodOptional<z.ZodString>;
|
|
593
|
+
}, z.core.$strip>>;
|
|
594
|
+
senderId: z.ZodString;
|
|
595
|
+
text: z.ZodOptional<z.ZodString>;
|
|
596
|
+
timestamp: z.ZodNumber;
|
|
597
|
+
pageId: z.ZodString;
|
|
598
|
+
replyToMessageId: z.ZodOptional<z.ZodString>;
|
|
599
|
+
}, z.core.$strip>;
|
|
600
|
+
};
|
|
339
601
|
readonly "meta-ads.object.created": {
|
|
340
602
|
readonly configSchema: z.ZodObject<{
|
|
341
603
|
account: z.ZodOptional<z.ZodString>;
|
|
@@ -382,9 +644,44 @@ export declare const metaAdsTriggerContracts: {
|
|
|
382
644
|
}, z.core.$strip>;
|
|
383
645
|
}, z.core.$strip>;
|
|
384
646
|
};
|
|
647
|
+
readonly "meta-ads.pageComment.created": {
|
|
648
|
+
readonly configSchema: z.ZodObject<{
|
|
649
|
+
account: z.ZodOptional<z.ZodString>;
|
|
650
|
+
pageId: z.ZodString;
|
|
651
|
+
}, z.core.$strip>;
|
|
652
|
+
readonly eventSchema: z.ZodObject<{
|
|
653
|
+
commentId: z.ZodString;
|
|
654
|
+
createdTime: z.ZodNumber;
|
|
655
|
+
from: z.ZodOptional<z.ZodObject<{
|
|
656
|
+
id: z.ZodString;
|
|
657
|
+
name: z.ZodOptional<z.ZodString>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
message: z.ZodOptional<z.ZodString>;
|
|
660
|
+
pageId: z.ZodString;
|
|
661
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
662
|
+
photo: z.ZodOptional<z.ZodString>;
|
|
663
|
+
post: z.ZodOptional<z.ZodObject<{
|
|
664
|
+
id: z.ZodOptional<z.ZodString>;
|
|
665
|
+
isPublished: z.ZodOptional<z.ZodBoolean>;
|
|
666
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
667
|
+
promotionStatus: z.ZodOptional<z.ZodString>;
|
|
668
|
+
statusType: z.ZodOptional<z.ZodString>;
|
|
669
|
+
updatedTime: z.ZodOptional<z.ZodString>;
|
|
670
|
+
}, z.core.$strip>>;
|
|
671
|
+
postId: z.ZodString;
|
|
672
|
+
video: z.ZodOptional<z.ZodString>;
|
|
673
|
+
}, z.core.$strip>;
|
|
674
|
+
};
|
|
385
675
|
};
|
|
386
676
|
/**
|
|
387
|
-
* Normalizes Meta's Page and ad-account envelopes into stable
|
|
677
|
+
* Normalizes Meta's Page, Instagram, and ad-account envelopes into stable
|
|
678
|
+
* public events.
|
|
679
|
+
*
|
|
680
|
+
* Classification happens here: only new comments, inbound messages, and
|
|
681
|
+
* mentions become semantic events. The Page's own comments, Instagram's own
|
|
682
|
+
* comments and message echoes are dropped, and unsent Instagram messages become
|
|
683
|
+
* deletion events. Malformed comment, mention, and message items are dropped so
|
|
684
|
+
* they can't reject a delivery that also carries leads.
|
|
388
685
|
*
|
|
389
686
|
* @param input - Untrusted provider webhook envelope.
|
|
390
687
|
*/
|