@zernio/node 0.2.215 → 0.2.217

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.
@@ -3454,7 +3454,7 @@ export type Webhook = {
3454
3454
  /**
3455
3455
  * Events subscribed to
3456
3456
  */
3457
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required')>;
3457
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released')>;
3458
3458
  /**
3459
3459
  * Whether webhook delivery is enabled
3460
3460
  */
@@ -6383,6 +6383,358 @@ export type GetGoogleBusinessSearchKeywordsError = ({
6383
6383
  code?: string;
6384
6384
  });
6385
6385
 
6386
+ export type GetInboxVolumeData = {
6387
+ query: {
6388
+ accountId?: string;
6389
+ /**
6390
+ * Inclusive lower bound (YYYY-MM-DD). Required.
6391
+ */
6392
+ fromDate: string;
6393
+ /**
6394
+ * Filter by single platform (facebook, instagram, twitter, etc.).
6395
+ */
6396
+ platform?: string;
6397
+ profileId?: string;
6398
+ /**
6399
+ * Filter by metadata.source lineage (human, workflow, sequence, broadcast, comment_automation, api, contact, platform).
6400
+ */
6401
+ source?: string;
6402
+ /**
6403
+ * Inclusive upper bound (YYYY-MM-DD). Defaults to today.
6404
+ */
6405
+ toDate?: string;
6406
+ };
6407
+ };
6408
+
6409
+ export type GetInboxVolumeResponse = ({
6410
+ success?: boolean;
6411
+ from?: string;
6412
+ to?: (string) | null;
6413
+ summary?: {
6414
+ received?: number;
6415
+ sent?: number;
6416
+ read?: number;
6417
+ failed?: number;
6418
+ uniqueConversations?: number;
6419
+ };
6420
+ timeseries?: Array<{
6421
+ date?: string;
6422
+ sent?: number;
6423
+ received?: number;
6424
+ read?: number;
6425
+ failed?: number;
6426
+ }>;
6427
+ byPlatform?: Array<{
6428
+ platform?: string;
6429
+ sent?: number;
6430
+ received?: number;
6431
+ read?: number;
6432
+ failed?: number;
6433
+ }>;
6434
+ });
6435
+
6436
+ export type GetInboxVolumeError = ({
6437
+ error?: string;
6438
+ details?: {
6439
+ [key: string]: unknown;
6440
+ };
6441
+ } | {
6442
+ error?: string;
6443
+ } | ErrorResponse);
6444
+
6445
+ export type GetInboxHeatmapData = {
6446
+ query: {
6447
+ accountId?: string;
6448
+ /**
6449
+ * Narrow to a single event type. "all" or omitted means no filter.
6450
+ */
6451
+ action?: 'message.received' | 'message.sent' | 'message.read' | 'all';
6452
+ fromDate: string;
6453
+ platform?: string;
6454
+ profileId?: string;
6455
+ source?: string;
6456
+ toDate?: string;
6457
+ };
6458
+ };
6459
+
6460
+ export type GetInboxHeatmapResponse = ({
6461
+ success?: boolean;
6462
+ from?: string;
6463
+ to?: (string) | null;
6464
+ buckets?: Array<{
6465
+ /**
6466
+ * 1 = Monday, 7 = Sunday
6467
+ */
6468
+ dow?: number;
6469
+ hour?: number;
6470
+ received?: number;
6471
+ sent?: number;
6472
+ read?: number;
6473
+ }>;
6474
+ });
6475
+
6476
+ export type GetInboxHeatmapError = ({
6477
+ error?: string;
6478
+ details?: {
6479
+ [key: string]: unknown;
6480
+ };
6481
+ } | {
6482
+ error?: string;
6483
+ } | ErrorResponse);
6484
+
6485
+ export type GetInboxSourceBreakdownData = {
6486
+ query: {
6487
+ accountId?: string;
6488
+ fromDate: string;
6489
+ platform?: string;
6490
+ profileId?: string;
6491
+ toDate?: string;
6492
+ };
6493
+ };
6494
+
6495
+ export type GetInboxSourceBreakdownResponse = ({
6496
+ success?: boolean;
6497
+ from?: string;
6498
+ to?: (string) | null;
6499
+ sources?: Array<{
6500
+ source?: string;
6501
+ received?: number;
6502
+ sent?: number;
6503
+ read?: number;
6504
+ byPlatform?: Array<{
6505
+ platform?: string;
6506
+ received?: number;
6507
+ sent?: number;
6508
+ read?: number;
6509
+ }>;
6510
+ }>;
6511
+ });
6512
+
6513
+ export type GetInboxSourceBreakdownError = ({
6514
+ error?: string;
6515
+ details?: {
6516
+ [key: string]: unknown;
6517
+ };
6518
+ } | {
6519
+ error?: string;
6520
+ } | ErrorResponse);
6521
+
6522
+ export type GetInboxResponseTimeData = {
6523
+ query: {
6524
+ accountId?: string;
6525
+ fromDate: string;
6526
+ platform?: string;
6527
+ profileId?: string;
6528
+ toDate?: string;
6529
+ };
6530
+ };
6531
+
6532
+ export type GetInboxResponseTimeResponse = ({
6533
+ success?: boolean;
6534
+ from?: string;
6535
+ to?: (string) | null;
6536
+ summary?: {
6537
+ sampleSize?: number;
6538
+ medianSeconds?: number;
6539
+ p90Seconds?: number;
6540
+ p99Seconds?: number;
6541
+ meanSeconds?: number;
6542
+ fastestSeconds?: number;
6543
+ slowestSeconds?: number;
6544
+ };
6545
+ histogram?: Array<{
6546
+ /**
6547
+ * Human label (0-1m, 1-5m, 5-15m, 15-60m, 1-4h, 4-24h, 1d+)
6548
+ */
6549
+ bucket?: string;
6550
+ lowerSeconds?: number;
6551
+ /**
6552
+ * null on the open-ended last bucket
6553
+ */
6554
+ upperSeconds?: (number) | null;
6555
+ count?: number;
6556
+ }>;
6557
+ });
6558
+
6559
+ export type GetInboxResponseTimeError = ({
6560
+ error?: string;
6561
+ details?: {
6562
+ [key: string]: unknown;
6563
+ };
6564
+ } | {
6565
+ error?: string;
6566
+ } | ErrorResponse);
6567
+
6568
+ export type GetInboxTopAccountsData = {
6569
+ query: {
6570
+ fromDate: string;
6571
+ /**
6572
+ * Cap on returned rows. Lower than the posting listing's 100 because each row triggers a SocialAccount Mongo lookup.
6573
+ */
6574
+ limit?: number;
6575
+ platform?: string;
6576
+ profileId?: string;
6577
+ source?: string;
6578
+ toDate?: string;
6579
+ };
6580
+ };
6581
+
6582
+ export type GetInboxTopAccountsResponse = ({
6583
+ success?: boolean;
6584
+ from?: string;
6585
+ to?: (string) | null;
6586
+ accounts?: Array<{
6587
+ accountId?: string;
6588
+ platform?: string;
6589
+ /**
6590
+ * (disconnected) when the SocialAccount no longer exists
6591
+ */
6592
+ displayName?: string;
6593
+ username?: string;
6594
+ received?: number;
6595
+ sent?: number;
6596
+ total?: number;
6597
+ conversations?: number;
6598
+ medianResponseSeconds?: number;
6599
+ /**
6600
+ * Distinguishes 'instant replies' from 'no replies at all' so a zero medianResponseSeconds with repliedCount=0 renders as '—' instead of '0s'
6601
+ */
6602
+ repliedCount?: number;
6603
+ }>;
6604
+ });
6605
+
6606
+ export type GetInboxTopAccountsError = ({
6607
+ error?: string;
6608
+ details?: {
6609
+ [key: string]: unknown;
6610
+ };
6611
+ } | {
6612
+ error?: string;
6613
+ } | ErrorResponse);
6614
+
6615
+ export type ListInboxConversationAnalyticsData = {
6616
+ query: {
6617
+ accountId?: string;
6618
+ fromDate: string;
6619
+ limit?: number;
6620
+ order?: 'asc' | 'desc';
6621
+ page?: number;
6622
+ platform?: string;
6623
+ profileId?: string;
6624
+ sortBy?: 'lastMessageAt' | 'firstMessageAt' | 'totalMessages' | 'received' | 'sent' | 'read' | 'failed';
6625
+ source?: string;
6626
+ toDate?: string;
6627
+ };
6628
+ };
6629
+
6630
+ export type ListInboxConversationAnalyticsResponse = ({
6631
+ success?: boolean;
6632
+ from?: string;
6633
+ to?: (string) | null;
6634
+ items?: Array<{
6635
+ /**
6636
+ * The platformConversationId (the same identity used by metadata.conversationId)
6637
+ */
6638
+ conversationId?: string;
6639
+ /**
6640
+ * The Conversation document _id, when a matching doc exists
6641
+ */
6642
+ mongoId?: (string) | null;
6643
+ accountId?: string;
6644
+ platform?: string;
6645
+ participantName?: (string) | null;
6646
+ participantUsername?: (string) | null;
6647
+ participantPicture?: (string) | null;
6648
+ /**
6649
+ * Cached preview from the Conversation doc
6650
+ */
6651
+ lastMessage?: (string) | null;
6652
+ totalMessages?: number;
6653
+ received?: number;
6654
+ sent?: number;
6655
+ read?: number;
6656
+ failed?: number;
6657
+ firstMessageAt?: string;
6658
+ lastMessageAt?: string;
6659
+ }>;
6660
+ pagination?: {
6661
+ page?: number;
6662
+ limit?: number;
6663
+ total?: number;
6664
+ totalPages?: number;
6665
+ hasMore?: boolean;
6666
+ };
6667
+ });
6668
+
6669
+ export type ListInboxConversationAnalyticsError = ({
6670
+ error?: string;
6671
+ details?: {
6672
+ [key: string]: unknown;
6673
+ };
6674
+ } | {
6675
+ error?: string;
6676
+ } | ErrorResponse);
6677
+
6678
+ export type GetInboxConversationAnalyticsData = {
6679
+ path: {
6680
+ /**
6681
+ * Mongo _id or platformConversationId.
6682
+ */
6683
+ conversationId: string;
6684
+ };
6685
+ query: {
6686
+ fromDate: string;
6687
+ toDate?: string;
6688
+ };
6689
+ };
6690
+
6691
+ export type GetInboxConversationAnalyticsResponse = ({
6692
+ success?: boolean;
6693
+ /**
6694
+ * The platformConversationId
6695
+ */
6696
+ conversationId?: string;
6697
+ mongoId?: string;
6698
+ platform?: (string) | null;
6699
+ from?: string;
6700
+ to?: (string) | null;
6701
+ summary?: {
6702
+ received?: number;
6703
+ sent?: number;
6704
+ read?: number;
6705
+ failed?: number;
6706
+ totalMessages?: number;
6707
+ firstMessageAt?: (string) | null;
6708
+ lastMessageAt?: (string) | null;
6709
+ };
6710
+ timeseries?: Array<{
6711
+ date?: string;
6712
+ sent?: number;
6713
+ received?: number;
6714
+ read?: number;
6715
+ failed?: number;
6716
+ }>;
6717
+ bySource?: Array<{
6718
+ /**
6719
+ * (unspecified) for legacy rows with no metadata.source
6720
+ */
6721
+ source?: string;
6722
+ count?: number;
6723
+ }>;
6724
+ });
6725
+
6726
+ export type GetInboxConversationAnalyticsError = ({
6727
+ error?: string;
6728
+ details?: {
6729
+ [key: string]: unknown;
6730
+ };
6731
+ } | {
6732
+ error?: string;
6733
+ } | {
6734
+ error?: string;
6735
+ code?: string;
6736
+ } | ErrorResponse);
6737
+
6386
6738
  export type ListAccountGroupsResponse = ({
6387
6739
  groups?: Array<{
6388
6740
  _id?: string;
@@ -11255,7 +11607,7 @@ export type CreateWebhookSettingsData = {
11255
11607
  /**
11256
11608
  * Events to subscribe to (at least one required)
11257
11609
  */
11258
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required')>;
11610
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released')>;
11259
11611
  /**
11260
11612
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
11261
11613
  */
@@ -11299,7 +11651,7 @@ export type UpdateWebhookSettingsData = {
11299
11651
  /**
11300
11652
  * Events to subscribe to. Must contain at least one event if provided.
11301
11653
  */
11302
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required')>;
11654
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'comment.received' | 'review.new' | 'review.updated' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released')>;
11303
11655
  /**
11304
11656
  * Enable or disable webhook delivery
11305
11657
  */
@@ -18400,6 +18752,26 @@ export type CreateStandaloneAdData = {
18400
18752
  * Meta only. Exact ad set name. Overrides the default `<name> - Ad Set`. (For per-ad names on the multi-creative shape, set `name` on each `creatives[]` entry.)
18401
18753
  */
18402
18754
  adSetName?: string;
18755
+ /**
18756
+ * Meta only. Exact ad name (the single-creative ad object's name). Overrides the default, which is `name`. (For per-ad names on the multi-creative shape, set `name` on each `creatives[]` entry instead.)
18757
+ */
18758
+ adName?: string;
18759
+ /**
18760
+ * Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the "Website events" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` becomes the ad's `url_tags` (click-tracking query params). Applied to every ad on the legacy single-creative and multi-creative shapes.
18761
+ */
18762
+ tracking?: {
18763
+ /**
18764
+ * Meta Pixel ID to attach for offsite-conversion measurement.
18765
+ */
18766
+ pixelId?: string;
18767
+ /**
18768
+ * Click-URL params appended to the ad's destination as `url_tags` (e.g. utm_source).
18769
+ */
18770
+ urlTags?: Array<{
18771
+ key: string;
18772
+ value: string;
18773
+ }>;
18774
+ };
18403
18775
  /**
18404
18776
  * Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted). TikTok-specific: `conversions` (website-conversion ad group) requires `promotedObject.pixelId` (your TikTok Pixel ID) and accepts an optional `promotedObject.customEventType` (a TikTok `optimization_event` code like `ON_WEB_ORDER`, `INITIATE_ORDER`, `ON_WEB_REGISTER`, `FORM`); to inherit a pixel + event from an existing ad group, pass `adSetId` instead. LinkedIn-specific: `engagement`, `traffic`, `awareness`, and `video_views` are supported for standalone ads (creates a Direct Sponsored Content single image or single video ad). `traffic` requires `linkUrl`; `video_views` requires the `video` field. For `lead_generation` / `conversions` on LinkedIn — or to promote an existing post — use `POST /v1/ads/boost`.
18405
18777
  */