@getlatedev/node 0.2.486 → 0.2.487

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/dist/index.d.mts CHANGED
@@ -15558,7 +15558,7 @@ type ListInboxConversationsData = {
15558
15558
  /**
15559
15559
  * Filter by platform
15560
15560
  */
15561
- platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
15561
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp';
15562
15562
  /**
15563
15563
  * Filter by profile ID
15564
15564
  */
@@ -15625,6 +15625,108 @@ type ListInboxConversationsResponse = ({
15625
15625
  */
15626
15626
  fetchedAt?: (string) | null;
15627
15627
  } | null;
15628
+ /**
15629
+ * Ad-click attribution for a conversation that started from a Meta ad.
15630
+ * Absent when the conversation did not originate from an ad click.
15631
+ *
15632
+ * Captured from the referral Meta attaches to the first inbound message
15633
+ * after the click, which is the only message that carries it. If the same
15634
+ * person later clicks a different ad, the original values are kept, so the
15635
+ * first ad wins. One exception on WhatsApp: when Meta omits `ctwa_clid`
15636
+ * from that referral, a later Meta automatic event can supply it and
15637
+ * refresh `ctwa_captured_at`, so treat `ctwa_captured_at` as the time
15638
+ * Zernio stored the value, not the time of the click.
15639
+ *
15640
+ * Two families of keys, one per surface. They never appear together:
15641
+ *
15642
+ * - `ctwa_*` is WhatsApp Click-to-WhatsApp. The ad ID is
15643
+ * `ctwa_source_id`. There is no `meta_ad_id` on WhatsApp.
15644
+ * - `meta_ad_*` is Instagram Click-to-Direct and Facebook Messenger
15645
+ * Click-to-Message. The ad ID is `meta_ad_id`. `ctwa_clid` never
15646
+ * appears on these platforms.
15647
+ *
15648
+ * Every key is optional and only the keys Meta supplied are returned, so
15649
+ * read defensively. Meta does not send a campaign or ad set ID, so none
15650
+ * is exposed here. More keys may be added over time. Treat any key you
15651
+ * do not recognise as an opaque string.
15652
+ *
15653
+ * Key names differ from the `message.received` webhook on purpose. The
15654
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
15655
+ * while the stored conversation record uses the prefixed names below.
15656
+ * Renaming either side would break existing integrations, so both
15657
+ * spellings are kept.
15658
+ *
15659
+ */
15660
+ metadata?: {
15661
+ /**
15662
+ * WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it.
15663
+ */
15664
+ ctwa_clid?: string;
15665
+ /**
15666
+ * WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id.
15667
+ */
15668
+ ctwa_source_id?: string;
15669
+ /**
15670
+ * WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post).
15671
+ */
15672
+ ctwa_source_type?: string;
15673
+ /**
15674
+ * WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link.
15675
+ */
15676
+ ctwa_source_url?: string;
15677
+ /**
15678
+ * WhatsApp only. Headline of the ad creative at click time.
15679
+ */
15680
+ ctwa_headline?: string;
15681
+ /**
15682
+ * WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured.
15683
+ */
15684
+ ctwa_captured_at?: string;
15685
+ /**
15686
+ * Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured.
15687
+ */
15688
+ meta_ad_id?: string;
15689
+ /**
15690
+ * Instagram and Facebook only. Meta-supplied source identifier, for example ADS.
15691
+ */
15692
+ meta_ad_source?: string;
15693
+ /**
15694
+ * Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD.
15695
+ */
15696
+ meta_ad_type?: string;
15697
+ /**
15698
+ * Instagram and Facebook only. The ref parameter passed through from the ad creative.
15699
+ */
15700
+ meta_ad_ref?: string;
15701
+ /**
15702
+ * Instagram and Facebook only. Title of the ad creative at click time.
15703
+ */
15704
+ meta_ad_title?: string;
15705
+ /**
15706
+ * Instagram and Facebook only. Image of the ad creative at click time.
15707
+ */
15708
+ meta_ad_photo_url?: string;
15709
+ /**
15710
+ * Instagram and Facebook only. Video of the ad creative at click time.
15711
+ */
15712
+ meta_ad_video_url?: string;
15713
+ /**
15714
+ * Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post.
15715
+ */
15716
+ meta_ad_post_id?: string;
15717
+ /**
15718
+ * Instagram and Facebook only. The catalogue product the user clicked, for product ads.
15719
+ */
15720
+ meta_ad_product_id?: string;
15721
+ /**
15722
+ * Instagram and Facebook only. The Meta flow the ad launched, for flow ads.
15723
+ */
15724
+ meta_ad_flow_id?: string;
15725
+ /**
15726
+ * Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured.
15727
+ */
15728
+ meta_ad_captured_at?: string;
15729
+ } | null;
15628
15730
  }>;
15629
15731
  pagination?: {
15630
15732
  hasMore?: boolean;
@@ -15898,6 +16000,79 @@ type GetInboxConversationResponse = ({
15898
16000
  */
15899
16001
  fetchedAt?: (string) | null;
15900
16002
  } | null;
16003
+ /**
16004
+ * Ad-click attribution for a conversation that started from a Meta ad.
16005
+ * Absent when the conversation did not originate from an ad click.
16006
+ *
16007
+ * Captured once, on the first inbound message after the click, and never
16008
+ * overwritten. If the same person later clicks a different ad, the
16009
+ * original values are kept. Meta only sends the referral on that first
16010
+ * message.
16011
+ *
16012
+ * This operation currently returns only the `meta_ad_*` family, which
16013
+ * covers Instagram Click-to-Direct and Facebook Messenger
16014
+ * Click-to-Message. WhatsApp Click-to-WhatsApp attribution (the `ctwa_*`
16015
+ * keys, where the ad ID is `ctwa_source_id`) is returned by
16016
+ * `GET /v1/inbox/conversations` instead.
16017
+ *
16018
+ * Every key is optional and only the keys Meta supplied are returned, so
16019
+ * read defensively. Meta does not send a campaign or ad set ID, so none is
16020
+ * exposed here. More keys may be added over time. Treat any key you do not
16021
+ * recognise as an opaque string.
16022
+ *
16023
+ * Key names differ from the `message.received` webhook on purpose. The
16024
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
16025
+ * while the stored conversation record uses the prefixed names below.
16026
+ * Renaming either side would break existing integrations, so both
16027
+ * spellings are kept.
16028
+ *
16029
+ */
16030
+ metadata?: {
16031
+ /**
16032
+ * The Meta ad ID the user clicked. Always present when a referral was captured.
16033
+ */
16034
+ meta_ad_id?: string;
16035
+ /**
16036
+ * Meta-supplied source identifier, for example ADS.
16037
+ */
16038
+ meta_ad_source?: string;
16039
+ /**
16040
+ * Meta-supplied referral type, for example OPEN_THREAD.
16041
+ */
16042
+ meta_ad_type?: string;
16043
+ /**
16044
+ * The ref parameter passed through from the ad creative.
16045
+ */
16046
+ meta_ad_ref?: string;
16047
+ /**
16048
+ * Title of the ad creative at click time.
16049
+ */
16050
+ meta_ad_title?: string;
16051
+ /**
16052
+ * Image of the ad creative at click time.
16053
+ */
16054
+ meta_ad_photo_url?: string;
16055
+ /**
16056
+ * Video of the ad creative at click time.
16057
+ */
16058
+ meta_ad_video_url?: string;
16059
+ /**
16060
+ * The organic post the ad promoted, when the ad was a boosted post.
16061
+ */
16062
+ meta_ad_post_id?: string;
16063
+ /**
16064
+ * The catalogue product the user clicked, for product ads.
16065
+ */
16066
+ meta_ad_product_id?: string;
16067
+ /**
16068
+ * The Meta flow the ad launched, for flow ads.
16069
+ */
16070
+ meta_ad_flow_id?: string;
16071
+ /**
16072
+ * When Zernio stored this referral. Always present when a referral was captured.
16073
+ */
16074
+ meta_ad_captured_at?: string;
16075
+ } | null;
15901
16076
  };
15902
16077
  });
15903
16078
  type GetInboxConversationError = ({
package/dist/index.d.ts CHANGED
@@ -15558,7 +15558,7 @@ type ListInboxConversationsData = {
15558
15558
  /**
15559
15559
  * Filter by platform
15560
15560
  */
15561
- platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
15561
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp';
15562
15562
  /**
15563
15563
  * Filter by profile ID
15564
15564
  */
@@ -15625,6 +15625,108 @@ type ListInboxConversationsResponse = ({
15625
15625
  */
15626
15626
  fetchedAt?: (string) | null;
15627
15627
  } | null;
15628
+ /**
15629
+ * Ad-click attribution for a conversation that started from a Meta ad.
15630
+ * Absent when the conversation did not originate from an ad click.
15631
+ *
15632
+ * Captured from the referral Meta attaches to the first inbound message
15633
+ * after the click, which is the only message that carries it. If the same
15634
+ * person later clicks a different ad, the original values are kept, so the
15635
+ * first ad wins. One exception on WhatsApp: when Meta omits `ctwa_clid`
15636
+ * from that referral, a later Meta automatic event can supply it and
15637
+ * refresh `ctwa_captured_at`, so treat `ctwa_captured_at` as the time
15638
+ * Zernio stored the value, not the time of the click.
15639
+ *
15640
+ * Two families of keys, one per surface. They never appear together:
15641
+ *
15642
+ * - `ctwa_*` is WhatsApp Click-to-WhatsApp. The ad ID is
15643
+ * `ctwa_source_id`. There is no `meta_ad_id` on WhatsApp.
15644
+ * - `meta_ad_*` is Instagram Click-to-Direct and Facebook Messenger
15645
+ * Click-to-Message. The ad ID is `meta_ad_id`. `ctwa_clid` never
15646
+ * appears on these platforms.
15647
+ *
15648
+ * Every key is optional and only the keys Meta supplied are returned, so
15649
+ * read defensively. Meta does not send a campaign or ad set ID, so none
15650
+ * is exposed here. More keys may be added over time. Treat any key you
15651
+ * do not recognise as an opaque string.
15652
+ *
15653
+ * Key names differ from the `message.received` webhook on purpose. The
15654
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
15655
+ * while the stored conversation record uses the prefixed names below.
15656
+ * Renaming either side would break existing integrations, so both
15657
+ * spellings are kept.
15658
+ *
15659
+ */
15660
+ metadata?: {
15661
+ /**
15662
+ * WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it.
15663
+ */
15664
+ ctwa_clid?: string;
15665
+ /**
15666
+ * WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id.
15667
+ */
15668
+ ctwa_source_id?: string;
15669
+ /**
15670
+ * WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post).
15671
+ */
15672
+ ctwa_source_type?: string;
15673
+ /**
15674
+ * WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link.
15675
+ */
15676
+ ctwa_source_url?: string;
15677
+ /**
15678
+ * WhatsApp only. Headline of the ad creative at click time.
15679
+ */
15680
+ ctwa_headline?: string;
15681
+ /**
15682
+ * WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured.
15683
+ */
15684
+ ctwa_captured_at?: string;
15685
+ /**
15686
+ * Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured.
15687
+ */
15688
+ meta_ad_id?: string;
15689
+ /**
15690
+ * Instagram and Facebook only. Meta-supplied source identifier, for example ADS.
15691
+ */
15692
+ meta_ad_source?: string;
15693
+ /**
15694
+ * Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD.
15695
+ */
15696
+ meta_ad_type?: string;
15697
+ /**
15698
+ * Instagram and Facebook only. The ref parameter passed through from the ad creative.
15699
+ */
15700
+ meta_ad_ref?: string;
15701
+ /**
15702
+ * Instagram and Facebook only. Title of the ad creative at click time.
15703
+ */
15704
+ meta_ad_title?: string;
15705
+ /**
15706
+ * Instagram and Facebook only. Image of the ad creative at click time.
15707
+ */
15708
+ meta_ad_photo_url?: string;
15709
+ /**
15710
+ * Instagram and Facebook only. Video of the ad creative at click time.
15711
+ */
15712
+ meta_ad_video_url?: string;
15713
+ /**
15714
+ * Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post.
15715
+ */
15716
+ meta_ad_post_id?: string;
15717
+ /**
15718
+ * Instagram and Facebook only. The catalogue product the user clicked, for product ads.
15719
+ */
15720
+ meta_ad_product_id?: string;
15721
+ /**
15722
+ * Instagram and Facebook only. The Meta flow the ad launched, for flow ads.
15723
+ */
15724
+ meta_ad_flow_id?: string;
15725
+ /**
15726
+ * Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured.
15727
+ */
15728
+ meta_ad_captured_at?: string;
15729
+ } | null;
15628
15730
  }>;
15629
15731
  pagination?: {
15630
15732
  hasMore?: boolean;
@@ -15898,6 +16000,79 @@ type GetInboxConversationResponse = ({
15898
16000
  */
15899
16001
  fetchedAt?: (string) | null;
15900
16002
  } | null;
16003
+ /**
16004
+ * Ad-click attribution for a conversation that started from a Meta ad.
16005
+ * Absent when the conversation did not originate from an ad click.
16006
+ *
16007
+ * Captured once, on the first inbound message after the click, and never
16008
+ * overwritten. If the same person later clicks a different ad, the
16009
+ * original values are kept. Meta only sends the referral on that first
16010
+ * message.
16011
+ *
16012
+ * This operation currently returns only the `meta_ad_*` family, which
16013
+ * covers Instagram Click-to-Direct and Facebook Messenger
16014
+ * Click-to-Message. WhatsApp Click-to-WhatsApp attribution (the `ctwa_*`
16015
+ * keys, where the ad ID is `ctwa_source_id`) is returned by
16016
+ * `GET /v1/inbox/conversations` instead.
16017
+ *
16018
+ * Every key is optional and only the keys Meta supplied are returned, so
16019
+ * read defensively. Meta does not send a campaign or ad set ID, so none is
16020
+ * exposed here. More keys may be added over time. Treat any key you do not
16021
+ * recognise as an opaque string.
16022
+ *
16023
+ * Key names differ from the `message.received` webhook on purpose. The
16024
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
16025
+ * while the stored conversation record uses the prefixed names below.
16026
+ * Renaming either side would break existing integrations, so both
16027
+ * spellings are kept.
16028
+ *
16029
+ */
16030
+ metadata?: {
16031
+ /**
16032
+ * The Meta ad ID the user clicked. Always present when a referral was captured.
16033
+ */
16034
+ meta_ad_id?: string;
16035
+ /**
16036
+ * Meta-supplied source identifier, for example ADS.
16037
+ */
16038
+ meta_ad_source?: string;
16039
+ /**
16040
+ * Meta-supplied referral type, for example OPEN_THREAD.
16041
+ */
16042
+ meta_ad_type?: string;
16043
+ /**
16044
+ * The ref parameter passed through from the ad creative.
16045
+ */
16046
+ meta_ad_ref?: string;
16047
+ /**
16048
+ * Title of the ad creative at click time.
16049
+ */
16050
+ meta_ad_title?: string;
16051
+ /**
16052
+ * Image of the ad creative at click time.
16053
+ */
16054
+ meta_ad_photo_url?: string;
16055
+ /**
16056
+ * Video of the ad creative at click time.
16057
+ */
16058
+ meta_ad_video_url?: string;
16059
+ /**
16060
+ * The organic post the ad promoted, when the ad was a boosted post.
16061
+ */
16062
+ meta_ad_post_id?: string;
16063
+ /**
16064
+ * The catalogue product the user clicked, for product ads.
16065
+ */
16066
+ meta_ad_product_id?: string;
16067
+ /**
16068
+ * The Meta flow the ad launched, for flow ads.
16069
+ */
16070
+ meta_ad_flow_id?: string;
16071
+ /**
16072
+ * When Zernio stored this referral. Always present when a referral was captured.
16073
+ */
16074
+ meta_ad_captured_at?: string;
16075
+ } | null;
15901
16076
  };
15902
16077
  });
15903
16078
  type GetInboxConversationError = ({
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.486",
39
+ version: "0.2.487",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.486",
8
+ version: "0.2.487",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.486",
3
+ "version": "0.2.487",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15215,7 +15215,7 @@ export type ListInboxConversationsData = {
15215
15215
  /**
15216
15216
  * Filter by platform
15217
15217
  */
15218
- platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram';
15218
+ platform?: 'facebook' | 'instagram' | 'twitter' | 'bluesky' | 'reddit' | 'telegram' | 'whatsapp';
15219
15219
  /**
15220
15220
  * Filter by profile ID
15221
15221
  */
@@ -15283,6 +15283,108 @@ export type ListInboxConversationsResponse = ({
15283
15283
  */
15284
15284
  fetchedAt?: (string) | null;
15285
15285
  } | null;
15286
+ /**
15287
+ * Ad-click attribution for a conversation that started from a Meta ad.
15288
+ * Absent when the conversation did not originate from an ad click.
15289
+ *
15290
+ * Captured from the referral Meta attaches to the first inbound message
15291
+ * after the click, which is the only message that carries it. If the same
15292
+ * person later clicks a different ad, the original values are kept, so the
15293
+ * first ad wins. One exception on WhatsApp: when Meta omits `ctwa_clid`
15294
+ * from that referral, a later Meta automatic event can supply it and
15295
+ * refresh `ctwa_captured_at`, so treat `ctwa_captured_at` as the time
15296
+ * Zernio stored the value, not the time of the click.
15297
+ *
15298
+ * Two families of keys, one per surface. They never appear together:
15299
+ *
15300
+ * - `ctwa_*` is WhatsApp Click-to-WhatsApp. The ad ID is
15301
+ * `ctwa_source_id`. There is no `meta_ad_id` on WhatsApp.
15302
+ * - `meta_ad_*` is Instagram Click-to-Direct and Facebook Messenger
15303
+ * Click-to-Message. The ad ID is `meta_ad_id`. `ctwa_clid` never
15304
+ * appears on these platforms.
15305
+ *
15306
+ * Every key is optional and only the keys Meta supplied are returned, so
15307
+ * read defensively. Meta does not send a campaign or ad set ID, so none
15308
+ * is exposed here. More keys may be added over time. Treat any key you
15309
+ * do not recognise as an opaque string.
15310
+ *
15311
+ * Key names differ from the `message.received` webhook on purpose. The
15312
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
15313
+ * while the stored conversation record uses the prefixed names below.
15314
+ * Renaming either side would break existing integrations, so both
15315
+ * spellings are kept.
15316
+ *
15317
+ */
15318
+ metadata?: {
15319
+ /**
15320
+ * WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it.
15321
+ */
15322
+ ctwa_clid?: string;
15323
+ /**
15324
+ * WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id.
15325
+ */
15326
+ ctwa_source_id?: string;
15327
+ /**
15328
+ * WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post).
15329
+ */
15330
+ ctwa_source_type?: string;
15331
+ /**
15332
+ * WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link.
15333
+ */
15334
+ ctwa_source_url?: string;
15335
+ /**
15336
+ * WhatsApp only. Headline of the ad creative at click time.
15337
+ */
15338
+ ctwa_headline?: string;
15339
+ /**
15340
+ * WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured.
15341
+ */
15342
+ ctwa_captured_at?: string;
15343
+ /**
15344
+ * Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured.
15345
+ */
15346
+ meta_ad_id?: string;
15347
+ /**
15348
+ * Instagram and Facebook only. Meta-supplied source identifier, for example ADS.
15349
+ */
15350
+ meta_ad_source?: string;
15351
+ /**
15352
+ * Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD.
15353
+ */
15354
+ meta_ad_type?: string;
15355
+ /**
15356
+ * Instagram and Facebook only. The ref parameter passed through from the ad creative.
15357
+ */
15358
+ meta_ad_ref?: string;
15359
+ /**
15360
+ * Instagram and Facebook only. Title of the ad creative at click time.
15361
+ */
15362
+ meta_ad_title?: string;
15363
+ /**
15364
+ * Instagram and Facebook only. Image of the ad creative at click time.
15365
+ */
15366
+ meta_ad_photo_url?: string;
15367
+ /**
15368
+ * Instagram and Facebook only. Video of the ad creative at click time.
15369
+ */
15370
+ meta_ad_video_url?: string;
15371
+ /**
15372
+ * Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post.
15373
+ */
15374
+ meta_ad_post_id?: string;
15375
+ /**
15376
+ * Instagram and Facebook only. The catalogue product the user clicked, for product ads.
15377
+ */
15378
+ meta_ad_product_id?: string;
15379
+ /**
15380
+ * Instagram and Facebook only. The Meta flow the ad launched, for flow ads.
15381
+ */
15382
+ meta_ad_flow_id?: string;
15383
+ /**
15384
+ * Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured.
15385
+ */
15386
+ meta_ad_captured_at?: string;
15387
+ } | null;
15286
15388
  }>;
15287
15389
  pagination?: {
15288
15390
  hasMore?: boolean;
@@ -15565,6 +15667,79 @@ export type GetInboxConversationResponse = ({
15565
15667
  */
15566
15668
  fetchedAt?: (string) | null;
15567
15669
  } | null;
15670
+ /**
15671
+ * Ad-click attribution for a conversation that started from a Meta ad.
15672
+ * Absent when the conversation did not originate from an ad click.
15673
+ *
15674
+ * Captured once, on the first inbound message after the click, and never
15675
+ * overwritten. If the same person later clicks a different ad, the
15676
+ * original values are kept. Meta only sends the referral on that first
15677
+ * message.
15678
+ *
15679
+ * This operation currently returns only the `meta_ad_*` family, which
15680
+ * covers Instagram Click-to-Direct and Facebook Messenger
15681
+ * Click-to-Message. WhatsApp Click-to-WhatsApp attribution (the `ctwa_*`
15682
+ * keys, where the ad ID is `ctwa_source_id`) is returned by
15683
+ * `GET /v1/inbox/conversations` instead.
15684
+ *
15685
+ * Every key is optional and only the keys Meta supplied are returned, so
15686
+ * read defensively. Meta does not send a campaign or ad set ID, so none is
15687
+ * exposed here. More keys may be added over time. Treat any key you do not
15688
+ * recognise as an opaque string.
15689
+ *
15690
+ * Key names differ from the `message.received` webhook on purpose. The
15691
+ * webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`)
15692
+ * while the stored conversation record uses the prefixed names below.
15693
+ * Renaming either side would break existing integrations, so both
15694
+ * spellings are kept.
15695
+ *
15696
+ */
15697
+ metadata?: {
15698
+ /**
15699
+ * The Meta ad ID the user clicked. Always present when a referral was captured.
15700
+ */
15701
+ meta_ad_id?: string;
15702
+ /**
15703
+ * Meta-supplied source identifier, for example ADS.
15704
+ */
15705
+ meta_ad_source?: string;
15706
+ /**
15707
+ * Meta-supplied referral type, for example OPEN_THREAD.
15708
+ */
15709
+ meta_ad_type?: string;
15710
+ /**
15711
+ * The ref parameter passed through from the ad creative.
15712
+ */
15713
+ meta_ad_ref?: string;
15714
+ /**
15715
+ * Title of the ad creative at click time.
15716
+ */
15717
+ meta_ad_title?: string;
15718
+ /**
15719
+ * Image of the ad creative at click time.
15720
+ */
15721
+ meta_ad_photo_url?: string;
15722
+ /**
15723
+ * Video of the ad creative at click time.
15724
+ */
15725
+ meta_ad_video_url?: string;
15726
+ /**
15727
+ * The organic post the ad promoted, when the ad was a boosted post.
15728
+ */
15729
+ meta_ad_post_id?: string;
15730
+ /**
15731
+ * The catalogue product the user clicked, for product ads.
15732
+ */
15733
+ meta_ad_product_id?: string;
15734
+ /**
15735
+ * The Meta flow the ad launched, for flow ads.
15736
+ */
15737
+ meta_ad_flow_id?: string;
15738
+ /**
15739
+ * When Zernio stored this referral. Always present when a referral was captured.
15740
+ */
15741
+ meta_ad_captured_at?: string;
15742
+ } | null;
15568
15743
  };
15569
15744
  });
15570
15745