@getlatedev/node 0.2.316 → 0.2.318
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 +166 -10
- package/dist/index.d.ts +166 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +166 -10
package/dist/index.d.mts
CHANGED
|
@@ -5640,6 +5640,56 @@ type WebhookPayloadMessage = {
|
|
|
5640
5640
|
flowResponseData?: {
|
|
5641
5641
|
[key: string]: unknown;
|
|
5642
5642
|
};
|
|
5643
|
+
/**
|
|
5644
|
+
* WhatsApp only. Cart submitted by the user from a commerce message
|
|
5645
|
+
* (catalog, product, or product-list message). Meta's `order` object
|
|
5646
|
+
* forwarded verbatim.
|
|
5647
|
+
*
|
|
5648
|
+
*/
|
|
5649
|
+
order?: {
|
|
5650
|
+
/**
|
|
5651
|
+
* Meta catalog the ordered products belong to.
|
|
5652
|
+
*/
|
|
5653
|
+
catalog_id?: string;
|
|
5654
|
+
/**
|
|
5655
|
+
* Optional free-text note the user attached to the cart.
|
|
5656
|
+
*/
|
|
5657
|
+
text?: string;
|
|
5658
|
+
product_items?: Array<{
|
|
5659
|
+
/**
|
|
5660
|
+
* Retailer ID (SKU) of the ordered product.
|
|
5661
|
+
*/
|
|
5662
|
+
product_retailer_id?: string;
|
|
5663
|
+
/**
|
|
5664
|
+
* Quantity ordered for this line item.
|
|
5665
|
+
*/
|
|
5666
|
+
quantity?: number;
|
|
5667
|
+
/**
|
|
5668
|
+
* Unit price of the item.
|
|
5669
|
+
*/
|
|
5670
|
+
item_price?: number;
|
|
5671
|
+
/**
|
|
5672
|
+
* ISO 4217 currency code (e.g. USD).
|
|
5673
|
+
*/
|
|
5674
|
+
currency?: string;
|
|
5675
|
+
}>;
|
|
5676
|
+
};
|
|
5677
|
+
/**
|
|
5678
|
+
* WhatsApp only. The product the user is asking about. Set when an
|
|
5679
|
+
* inbound text carries Meta's `context.referred_product` (the user
|
|
5680
|
+
* tapped "Message business" on a product). Forwarded verbatim.
|
|
5681
|
+
*
|
|
5682
|
+
*/
|
|
5683
|
+
referredProduct?: {
|
|
5684
|
+
/**
|
|
5685
|
+
* Meta catalog the product belongs to.
|
|
5686
|
+
*/
|
|
5687
|
+
catalog_id?: string;
|
|
5688
|
+
/**
|
|
5689
|
+
* Retailer ID (SKU) of the product being asked about.
|
|
5690
|
+
*/
|
|
5691
|
+
product_retailer_id?: string;
|
|
5692
|
+
};
|
|
5643
5693
|
/**
|
|
5644
5694
|
* Instagram only. Populated when an IG user replies to one of the
|
|
5645
5695
|
* account's stories (Meta `messaging_story_replies`). Mutually
|
|
@@ -13717,16 +13767,32 @@ type SendInboxMessageData = {
|
|
|
13717
13767
|
};
|
|
13718
13768
|
/**
|
|
13719
13769
|
* WhatsApp-only. Rich interactive payload for list messages, CTA URL
|
|
13720
|
-
* buttons, Flow prompts,
|
|
13721
|
-
*
|
|
13722
|
-
*
|
|
13723
|
-
*
|
|
13770
|
+
* buttons, Flow prompts, location requests, voice-call buttons, and
|
|
13771
|
+
* commerce messages (single product, product list, catalog, and
|
|
13772
|
+
* carousel). When set, takes priority over `buttons` and
|
|
13773
|
+
* `quickReplies`. The shape mirrors Meta's Cloud API `interactive`
|
|
13774
|
+
* object verbatim, so any payload that works against Meta directly
|
|
13775
|
+
* will also work here.
|
|
13724
13776
|
*
|
|
13725
13777
|
* Use `buttons` / `quickReplies` for simple button replies
|
|
13726
|
-
* (WhatsApp's `interactive.type: "button"`)
|
|
13778
|
+
* (WhatsApp's `interactive.type: "button"`): the abstraction caps at
|
|
13727
13779
|
* 3 buttons and handles the auto-conversion for you. Use this field
|
|
13728
|
-
* only for
|
|
13729
|
-
*
|
|
13780
|
+
* only for the types listed in the enum below.
|
|
13781
|
+
*
|
|
13782
|
+
* All interactive messages are session messages: they can only be
|
|
13783
|
+
* sent inside the 24-hour customer service window opened by the
|
|
13784
|
+
* user's last inbound message.
|
|
13785
|
+
*
|
|
13786
|
+
* Commerce types (`product`, `product_list`, `catalog_message`, and
|
|
13787
|
+
* product carousels) require a Meta catalog connected to the
|
|
13788
|
+
* WhatsApp Business Account in Commerce Manager. Media carousels
|
|
13789
|
+
* (image/video cards) do not need a catalog.
|
|
13790
|
+
*
|
|
13791
|
+
* For `product`, `body` is optional (WhatsApp renders the product
|
|
13792
|
+
* card itself) and `header` is not allowed (the product image is
|
|
13793
|
+
* the header). For `product_list`, a `header` with `type: "text"`
|
|
13794
|
+
* is required. For `carousel`, top-level `header`/`footer` are not
|
|
13795
|
+
* supported; media goes on each card instead.
|
|
13730
13796
|
*
|
|
13731
13797
|
* For `voice_call`, the message renders WhatsApp's native call
|
|
13732
13798
|
* button; tapping it starts a voice call to your business number.
|
|
@@ -13739,17 +13805,25 @@ type SendInboxMessageData = {
|
|
|
13739
13805
|
* "Send location" button; the user's reply arrives as a regular
|
|
13740
13806
|
* location message in the conversation.
|
|
13741
13807
|
*
|
|
13808
|
+
* For `catalog_message`, `action` may also be omitted (we default it
|
|
13809
|
+
* to `{ "name": "catalog_message" }`).
|
|
13810
|
+
*
|
|
13742
13811
|
* Tap events come back via the `message.received` webhook with
|
|
13743
13812
|
* `metadata.interactiveType` set to `list_reply` or `nfm_reply`.
|
|
13813
|
+
* Carts submitted from commerce messages arrive as `metadata.order`;
|
|
13814
|
+
* product inquiries arrive as `metadata.referredProduct`.
|
|
13744
13815
|
*
|
|
13745
13816
|
*/
|
|
13746
13817
|
interactive?: {
|
|
13747
13818
|
/**
|
|
13748
13819
|
* Which interactive layout to render.
|
|
13749
13820
|
*/
|
|
13750
|
-
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call';
|
|
13821
|
+
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call' | 'product' | 'product_list' | 'catalog_message' | 'carousel';
|
|
13751
13822
|
/**
|
|
13752
|
-
* Optional header shown above the body.
|
|
13823
|
+
* Optional header shown above the body. Required with
|
|
13824
|
+
* `type: "text"` for `product_list`; not allowed for `product`
|
|
13825
|
+
* or `carousel`.
|
|
13826
|
+
*
|
|
13753
13827
|
*/
|
|
13754
13828
|
header?: {
|
|
13755
13829
|
type?: 'text' | 'image' | 'video' | 'document';
|
|
@@ -13767,7 +13841,10 @@ type SendInboxMessageData = {
|
|
|
13767
13841
|
link?: string;
|
|
13768
13842
|
};
|
|
13769
13843
|
};
|
|
13770
|
-
|
|
13844
|
+
/**
|
|
13845
|
+
* Required for every type except `product`, where it is optional.
|
|
13846
|
+
*/
|
|
13847
|
+
body?: {
|
|
13771
13848
|
/**
|
|
13772
13849
|
* Main body text.
|
|
13773
13850
|
*/
|
|
@@ -13883,6 +13960,73 @@ type SendInboxMessageData = {
|
|
|
13883
13960
|
};
|
|
13884
13961
|
} | {
|
|
13885
13962
|
name: 'send_location';
|
|
13963
|
+
} | {
|
|
13964
|
+
/**
|
|
13965
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13966
|
+
*/
|
|
13967
|
+
catalog_id: string;
|
|
13968
|
+
/**
|
|
13969
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13970
|
+
*/
|
|
13971
|
+
product_retailer_id: string;
|
|
13972
|
+
} | {
|
|
13973
|
+
/**
|
|
13974
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13975
|
+
*/
|
|
13976
|
+
catalog_id: string;
|
|
13977
|
+
/**
|
|
13978
|
+
* 1-10 sections. Total products across all sections cannot exceed 30.
|
|
13979
|
+
*/
|
|
13980
|
+
sections: Array<{
|
|
13981
|
+
/**
|
|
13982
|
+
* Optional section header.
|
|
13983
|
+
*/
|
|
13984
|
+
title?: string;
|
|
13985
|
+
product_items: Array<{
|
|
13986
|
+
/**
|
|
13987
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13988
|
+
*/
|
|
13989
|
+
product_retailer_id: string;
|
|
13990
|
+
}>;
|
|
13991
|
+
}>;
|
|
13992
|
+
} | {
|
|
13993
|
+
name: 'catalog_message';
|
|
13994
|
+
parameters?: {
|
|
13995
|
+
/**
|
|
13996
|
+
* Optional product whose image is used as the message thumbnail. Falls back to the first catalog item when omitted.
|
|
13997
|
+
*/
|
|
13998
|
+
thumbnail_product_retailer_id?: string;
|
|
13999
|
+
};
|
|
14000
|
+
} | {
|
|
14001
|
+
cards: Array<{
|
|
14002
|
+
/**
|
|
14003
|
+
* Card position. Auto-filled sequentially when omitted.
|
|
14004
|
+
*/
|
|
14005
|
+
card_index?: number;
|
|
14006
|
+
/**
|
|
14007
|
+
* `product` for a product card; media cards use `cta_url` or a quick-reply type.
|
|
14008
|
+
*/
|
|
14009
|
+
type?: string;
|
|
14010
|
+
/**
|
|
14011
|
+
* Media cards only
|
|
14012
|
+
*/
|
|
14013
|
+
header?: {
|
|
14014
|
+
[key: string]: unknown;
|
|
14015
|
+
};
|
|
14016
|
+
/**
|
|
14017
|
+
* Optional card body text.
|
|
14018
|
+
*/
|
|
14019
|
+
body?: {
|
|
14020
|
+
[key: string]: unknown;
|
|
14021
|
+
};
|
|
14022
|
+
/**
|
|
14023
|
+
* Product cards: `{ catalog_id, product_retailer_id }` (required). Media cards: the card's button action (e.g. `cta_url` with `parameters.display_text` and `parameters.url`).
|
|
14024
|
+
*/
|
|
14025
|
+
action?: {
|
|
14026
|
+
[key: string]: unknown;
|
|
14027
|
+
};
|
|
14028
|
+
[key: string]: unknown | number | string;
|
|
14029
|
+
}>;
|
|
13886
14030
|
});
|
|
13887
14031
|
};
|
|
13888
14032
|
/**
|
|
@@ -15015,6 +15159,18 @@ type ListInboxMentionsResponse = ({
|
|
|
15015
15159
|
* LinkedIn URN of the person who mentioned you
|
|
15016
15160
|
*/
|
|
15017
15161
|
authorUrn?: (string) | null;
|
|
15162
|
+
/**
|
|
15163
|
+
* Display name of the author, resolved from authorUrn. Null when LinkedIn does not allow resolving the profile.
|
|
15164
|
+
*/
|
|
15165
|
+
authorName?: (string) | null;
|
|
15166
|
+
/**
|
|
15167
|
+
* LinkedIn vanity name of the author (the slug in their profile URL)
|
|
15168
|
+
*/
|
|
15169
|
+
authorUsername?: (string) | null;
|
|
15170
|
+
/**
|
|
15171
|
+
* Profile picture URL of the author. LinkedIn CDN URLs expire after some time, so fetch promptly rather than storing long-term.
|
|
15172
|
+
*/
|
|
15173
|
+
authorPicture?: (string) | null;
|
|
15018
15174
|
/**
|
|
15019
15175
|
* URN of the organization that was mentioned
|
|
15020
15176
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -5640,6 +5640,56 @@ type WebhookPayloadMessage = {
|
|
|
5640
5640
|
flowResponseData?: {
|
|
5641
5641
|
[key: string]: unknown;
|
|
5642
5642
|
};
|
|
5643
|
+
/**
|
|
5644
|
+
* WhatsApp only. Cart submitted by the user from a commerce message
|
|
5645
|
+
* (catalog, product, or product-list message). Meta's `order` object
|
|
5646
|
+
* forwarded verbatim.
|
|
5647
|
+
*
|
|
5648
|
+
*/
|
|
5649
|
+
order?: {
|
|
5650
|
+
/**
|
|
5651
|
+
* Meta catalog the ordered products belong to.
|
|
5652
|
+
*/
|
|
5653
|
+
catalog_id?: string;
|
|
5654
|
+
/**
|
|
5655
|
+
* Optional free-text note the user attached to the cart.
|
|
5656
|
+
*/
|
|
5657
|
+
text?: string;
|
|
5658
|
+
product_items?: Array<{
|
|
5659
|
+
/**
|
|
5660
|
+
* Retailer ID (SKU) of the ordered product.
|
|
5661
|
+
*/
|
|
5662
|
+
product_retailer_id?: string;
|
|
5663
|
+
/**
|
|
5664
|
+
* Quantity ordered for this line item.
|
|
5665
|
+
*/
|
|
5666
|
+
quantity?: number;
|
|
5667
|
+
/**
|
|
5668
|
+
* Unit price of the item.
|
|
5669
|
+
*/
|
|
5670
|
+
item_price?: number;
|
|
5671
|
+
/**
|
|
5672
|
+
* ISO 4217 currency code (e.g. USD).
|
|
5673
|
+
*/
|
|
5674
|
+
currency?: string;
|
|
5675
|
+
}>;
|
|
5676
|
+
};
|
|
5677
|
+
/**
|
|
5678
|
+
* WhatsApp only. The product the user is asking about. Set when an
|
|
5679
|
+
* inbound text carries Meta's `context.referred_product` (the user
|
|
5680
|
+
* tapped "Message business" on a product). Forwarded verbatim.
|
|
5681
|
+
*
|
|
5682
|
+
*/
|
|
5683
|
+
referredProduct?: {
|
|
5684
|
+
/**
|
|
5685
|
+
* Meta catalog the product belongs to.
|
|
5686
|
+
*/
|
|
5687
|
+
catalog_id?: string;
|
|
5688
|
+
/**
|
|
5689
|
+
* Retailer ID (SKU) of the product being asked about.
|
|
5690
|
+
*/
|
|
5691
|
+
product_retailer_id?: string;
|
|
5692
|
+
};
|
|
5643
5693
|
/**
|
|
5644
5694
|
* Instagram only. Populated when an IG user replies to one of the
|
|
5645
5695
|
* account's stories (Meta `messaging_story_replies`). Mutually
|
|
@@ -13717,16 +13767,32 @@ type SendInboxMessageData = {
|
|
|
13717
13767
|
};
|
|
13718
13768
|
/**
|
|
13719
13769
|
* WhatsApp-only. Rich interactive payload for list messages, CTA URL
|
|
13720
|
-
* buttons, Flow prompts,
|
|
13721
|
-
*
|
|
13722
|
-
*
|
|
13723
|
-
*
|
|
13770
|
+
* buttons, Flow prompts, location requests, voice-call buttons, and
|
|
13771
|
+
* commerce messages (single product, product list, catalog, and
|
|
13772
|
+
* carousel). When set, takes priority over `buttons` and
|
|
13773
|
+
* `quickReplies`. The shape mirrors Meta's Cloud API `interactive`
|
|
13774
|
+
* object verbatim, so any payload that works against Meta directly
|
|
13775
|
+
* will also work here.
|
|
13724
13776
|
*
|
|
13725
13777
|
* Use `buttons` / `quickReplies` for simple button replies
|
|
13726
|
-
* (WhatsApp's `interactive.type: "button"`)
|
|
13778
|
+
* (WhatsApp's `interactive.type: "button"`): the abstraction caps at
|
|
13727
13779
|
* 3 buttons and handles the auto-conversion for you. Use this field
|
|
13728
|
-
* only for
|
|
13729
|
-
*
|
|
13780
|
+
* only for the types listed in the enum below.
|
|
13781
|
+
*
|
|
13782
|
+
* All interactive messages are session messages: they can only be
|
|
13783
|
+
* sent inside the 24-hour customer service window opened by the
|
|
13784
|
+
* user's last inbound message.
|
|
13785
|
+
*
|
|
13786
|
+
* Commerce types (`product`, `product_list`, `catalog_message`, and
|
|
13787
|
+
* product carousels) require a Meta catalog connected to the
|
|
13788
|
+
* WhatsApp Business Account in Commerce Manager. Media carousels
|
|
13789
|
+
* (image/video cards) do not need a catalog.
|
|
13790
|
+
*
|
|
13791
|
+
* For `product`, `body` is optional (WhatsApp renders the product
|
|
13792
|
+
* card itself) and `header` is not allowed (the product image is
|
|
13793
|
+
* the header). For `product_list`, a `header` with `type: "text"`
|
|
13794
|
+
* is required. For `carousel`, top-level `header`/`footer` are not
|
|
13795
|
+
* supported; media goes on each card instead.
|
|
13730
13796
|
*
|
|
13731
13797
|
* For `voice_call`, the message renders WhatsApp's native call
|
|
13732
13798
|
* button; tapping it starts a voice call to your business number.
|
|
@@ -13739,17 +13805,25 @@ type SendInboxMessageData = {
|
|
|
13739
13805
|
* "Send location" button; the user's reply arrives as a regular
|
|
13740
13806
|
* location message in the conversation.
|
|
13741
13807
|
*
|
|
13808
|
+
* For `catalog_message`, `action` may also be omitted (we default it
|
|
13809
|
+
* to `{ "name": "catalog_message" }`).
|
|
13810
|
+
*
|
|
13742
13811
|
* Tap events come back via the `message.received` webhook with
|
|
13743
13812
|
* `metadata.interactiveType` set to `list_reply` or `nfm_reply`.
|
|
13813
|
+
* Carts submitted from commerce messages arrive as `metadata.order`;
|
|
13814
|
+
* product inquiries arrive as `metadata.referredProduct`.
|
|
13744
13815
|
*
|
|
13745
13816
|
*/
|
|
13746
13817
|
interactive?: {
|
|
13747
13818
|
/**
|
|
13748
13819
|
* Which interactive layout to render.
|
|
13749
13820
|
*/
|
|
13750
|
-
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call';
|
|
13821
|
+
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call' | 'product' | 'product_list' | 'catalog_message' | 'carousel';
|
|
13751
13822
|
/**
|
|
13752
|
-
* Optional header shown above the body.
|
|
13823
|
+
* Optional header shown above the body. Required with
|
|
13824
|
+
* `type: "text"` for `product_list`; not allowed for `product`
|
|
13825
|
+
* or `carousel`.
|
|
13826
|
+
*
|
|
13753
13827
|
*/
|
|
13754
13828
|
header?: {
|
|
13755
13829
|
type?: 'text' | 'image' | 'video' | 'document';
|
|
@@ -13767,7 +13841,10 @@ type SendInboxMessageData = {
|
|
|
13767
13841
|
link?: string;
|
|
13768
13842
|
};
|
|
13769
13843
|
};
|
|
13770
|
-
|
|
13844
|
+
/**
|
|
13845
|
+
* Required for every type except `product`, where it is optional.
|
|
13846
|
+
*/
|
|
13847
|
+
body?: {
|
|
13771
13848
|
/**
|
|
13772
13849
|
* Main body text.
|
|
13773
13850
|
*/
|
|
@@ -13883,6 +13960,73 @@ type SendInboxMessageData = {
|
|
|
13883
13960
|
};
|
|
13884
13961
|
} | {
|
|
13885
13962
|
name: 'send_location';
|
|
13963
|
+
} | {
|
|
13964
|
+
/**
|
|
13965
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13966
|
+
*/
|
|
13967
|
+
catalog_id: string;
|
|
13968
|
+
/**
|
|
13969
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13970
|
+
*/
|
|
13971
|
+
product_retailer_id: string;
|
|
13972
|
+
} | {
|
|
13973
|
+
/**
|
|
13974
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13975
|
+
*/
|
|
13976
|
+
catalog_id: string;
|
|
13977
|
+
/**
|
|
13978
|
+
* 1-10 sections. Total products across all sections cannot exceed 30.
|
|
13979
|
+
*/
|
|
13980
|
+
sections: Array<{
|
|
13981
|
+
/**
|
|
13982
|
+
* Optional section header.
|
|
13983
|
+
*/
|
|
13984
|
+
title?: string;
|
|
13985
|
+
product_items: Array<{
|
|
13986
|
+
/**
|
|
13987
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13988
|
+
*/
|
|
13989
|
+
product_retailer_id: string;
|
|
13990
|
+
}>;
|
|
13991
|
+
}>;
|
|
13992
|
+
} | {
|
|
13993
|
+
name: 'catalog_message';
|
|
13994
|
+
parameters?: {
|
|
13995
|
+
/**
|
|
13996
|
+
* Optional product whose image is used as the message thumbnail. Falls back to the first catalog item when omitted.
|
|
13997
|
+
*/
|
|
13998
|
+
thumbnail_product_retailer_id?: string;
|
|
13999
|
+
};
|
|
14000
|
+
} | {
|
|
14001
|
+
cards: Array<{
|
|
14002
|
+
/**
|
|
14003
|
+
* Card position. Auto-filled sequentially when omitted.
|
|
14004
|
+
*/
|
|
14005
|
+
card_index?: number;
|
|
14006
|
+
/**
|
|
14007
|
+
* `product` for a product card; media cards use `cta_url` or a quick-reply type.
|
|
14008
|
+
*/
|
|
14009
|
+
type?: string;
|
|
14010
|
+
/**
|
|
14011
|
+
* Media cards only
|
|
14012
|
+
*/
|
|
14013
|
+
header?: {
|
|
14014
|
+
[key: string]: unknown;
|
|
14015
|
+
};
|
|
14016
|
+
/**
|
|
14017
|
+
* Optional card body text.
|
|
14018
|
+
*/
|
|
14019
|
+
body?: {
|
|
14020
|
+
[key: string]: unknown;
|
|
14021
|
+
};
|
|
14022
|
+
/**
|
|
14023
|
+
* Product cards: `{ catalog_id, product_retailer_id }` (required). Media cards: the card's button action (e.g. `cta_url` with `parameters.display_text` and `parameters.url`).
|
|
14024
|
+
*/
|
|
14025
|
+
action?: {
|
|
14026
|
+
[key: string]: unknown;
|
|
14027
|
+
};
|
|
14028
|
+
[key: string]: unknown | number | string;
|
|
14029
|
+
}>;
|
|
13886
14030
|
});
|
|
13887
14031
|
};
|
|
13888
14032
|
/**
|
|
@@ -15015,6 +15159,18 @@ type ListInboxMentionsResponse = ({
|
|
|
15015
15159
|
* LinkedIn URN of the person who mentioned you
|
|
15016
15160
|
*/
|
|
15017
15161
|
authorUrn?: (string) | null;
|
|
15162
|
+
/**
|
|
15163
|
+
* Display name of the author, resolved from authorUrn. Null when LinkedIn does not allow resolving the profile.
|
|
15164
|
+
*/
|
|
15165
|
+
authorName?: (string) | null;
|
|
15166
|
+
/**
|
|
15167
|
+
* LinkedIn vanity name of the author (the slug in their profile URL)
|
|
15168
|
+
*/
|
|
15169
|
+
authorUsername?: (string) | null;
|
|
15170
|
+
/**
|
|
15171
|
+
* Profile picture URL of the author. LinkedIn CDN URLs expire after some time, so fetch promptly rather than storing long-term.
|
|
15172
|
+
*/
|
|
15173
|
+
authorPicture?: (string) | null;
|
|
15018
15174
|
/**
|
|
15019
15175
|
* URN of the organization that was mentioned
|
|
15020
15176
|
*/
|
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.
|
|
39
|
+
version: "0.2.318",
|
|
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.
|
|
8
|
+
version: "0.2.318",
|
|
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
|
@@ -4992,6 +4992,56 @@ export type WebhookPayloadMessage = {
|
|
|
4992
4992
|
flowResponseData?: {
|
|
4993
4993
|
[key: string]: unknown;
|
|
4994
4994
|
};
|
|
4995
|
+
/**
|
|
4996
|
+
* WhatsApp only. Cart submitted by the user from a commerce message
|
|
4997
|
+
* (catalog, product, or product-list message). Meta's `order` object
|
|
4998
|
+
* forwarded verbatim.
|
|
4999
|
+
*
|
|
5000
|
+
*/
|
|
5001
|
+
order?: {
|
|
5002
|
+
/**
|
|
5003
|
+
* Meta catalog the ordered products belong to.
|
|
5004
|
+
*/
|
|
5005
|
+
catalog_id?: string;
|
|
5006
|
+
/**
|
|
5007
|
+
* Optional free-text note the user attached to the cart.
|
|
5008
|
+
*/
|
|
5009
|
+
text?: string;
|
|
5010
|
+
product_items?: Array<{
|
|
5011
|
+
/**
|
|
5012
|
+
* Retailer ID (SKU) of the ordered product.
|
|
5013
|
+
*/
|
|
5014
|
+
product_retailer_id?: string;
|
|
5015
|
+
/**
|
|
5016
|
+
* Quantity ordered for this line item.
|
|
5017
|
+
*/
|
|
5018
|
+
quantity?: number;
|
|
5019
|
+
/**
|
|
5020
|
+
* Unit price of the item.
|
|
5021
|
+
*/
|
|
5022
|
+
item_price?: number;
|
|
5023
|
+
/**
|
|
5024
|
+
* ISO 4217 currency code (e.g. USD).
|
|
5025
|
+
*/
|
|
5026
|
+
currency?: string;
|
|
5027
|
+
}>;
|
|
5028
|
+
};
|
|
5029
|
+
/**
|
|
5030
|
+
* WhatsApp only. The product the user is asking about. Set when an
|
|
5031
|
+
* inbound text carries Meta's `context.referred_product` (the user
|
|
5032
|
+
* tapped "Message business" on a product). Forwarded verbatim.
|
|
5033
|
+
*
|
|
5034
|
+
*/
|
|
5035
|
+
referredProduct?: {
|
|
5036
|
+
/**
|
|
5037
|
+
* Meta catalog the product belongs to.
|
|
5038
|
+
*/
|
|
5039
|
+
catalog_id?: string;
|
|
5040
|
+
/**
|
|
5041
|
+
* Retailer ID (SKU) of the product being asked about.
|
|
5042
|
+
*/
|
|
5043
|
+
product_retailer_id?: string;
|
|
5044
|
+
};
|
|
4995
5045
|
/**
|
|
4996
5046
|
* Instagram only. Populated when an IG user replies to one of the
|
|
4997
5047
|
* account's stories (Meta `messaging_story_replies`). Mutually
|
|
@@ -13629,16 +13679,32 @@ export type SendInboxMessageData = {
|
|
|
13629
13679
|
};
|
|
13630
13680
|
/**
|
|
13631
13681
|
* WhatsApp-only. Rich interactive payload for list messages, CTA URL
|
|
13632
|
-
* buttons, Flow prompts,
|
|
13633
|
-
*
|
|
13634
|
-
*
|
|
13635
|
-
*
|
|
13682
|
+
* buttons, Flow prompts, location requests, voice-call buttons, and
|
|
13683
|
+
* commerce messages (single product, product list, catalog, and
|
|
13684
|
+
* carousel). When set, takes priority over `buttons` and
|
|
13685
|
+
* `quickReplies`. The shape mirrors Meta's Cloud API `interactive`
|
|
13686
|
+
* object verbatim, so any payload that works against Meta directly
|
|
13687
|
+
* will also work here.
|
|
13636
13688
|
*
|
|
13637
13689
|
* Use `buttons` / `quickReplies` for simple button replies
|
|
13638
|
-
* (WhatsApp's `interactive.type: "button"`)
|
|
13690
|
+
* (WhatsApp's `interactive.type: "button"`): the abstraction caps at
|
|
13639
13691
|
* 3 buttons and handles the auto-conversion for you. Use this field
|
|
13640
|
-
* only for
|
|
13641
|
-
*
|
|
13692
|
+
* only for the types listed in the enum below.
|
|
13693
|
+
*
|
|
13694
|
+
* All interactive messages are session messages: they can only be
|
|
13695
|
+
* sent inside the 24-hour customer service window opened by the
|
|
13696
|
+
* user's last inbound message.
|
|
13697
|
+
*
|
|
13698
|
+
* Commerce types (`product`, `product_list`, `catalog_message`, and
|
|
13699
|
+
* product carousels) require a Meta catalog connected to the
|
|
13700
|
+
* WhatsApp Business Account in Commerce Manager. Media carousels
|
|
13701
|
+
* (image/video cards) do not need a catalog.
|
|
13702
|
+
*
|
|
13703
|
+
* For `product`, `body` is optional (WhatsApp renders the product
|
|
13704
|
+
* card itself) and `header` is not allowed (the product image is
|
|
13705
|
+
* the header). For `product_list`, a `header` with `type: "text"`
|
|
13706
|
+
* is required. For `carousel`, top-level `header`/`footer` are not
|
|
13707
|
+
* supported; media goes on each card instead.
|
|
13642
13708
|
*
|
|
13643
13709
|
* For `voice_call`, the message renders WhatsApp's native call
|
|
13644
13710
|
* button; tapping it starts a voice call to your business number.
|
|
@@ -13651,17 +13717,25 @@ export type SendInboxMessageData = {
|
|
|
13651
13717
|
* "Send location" button; the user's reply arrives as a regular
|
|
13652
13718
|
* location message in the conversation.
|
|
13653
13719
|
*
|
|
13720
|
+
* For `catalog_message`, `action` may also be omitted (we default it
|
|
13721
|
+
* to `{ "name": "catalog_message" }`).
|
|
13722
|
+
*
|
|
13654
13723
|
* Tap events come back via the `message.received` webhook with
|
|
13655
13724
|
* `metadata.interactiveType` set to `list_reply` or `nfm_reply`.
|
|
13725
|
+
* Carts submitted from commerce messages arrive as `metadata.order`;
|
|
13726
|
+
* product inquiries arrive as `metadata.referredProduct`.
|
|
13656
13727
|
*
|
|
13657
13728
|
*/
|
|
13658
13729
|
interactive?: {
|
|
13659
13730
|
/**
|
|
13660
13731
|
* Which interactive layout to render.
|
|
13661
13732
|
*/
|
|
13662
|
-
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call';
|
|
13733
|
+
type: 'list' | 'cta_url' | 'flow' | 'location_request_message' | 'voice_call' | 'product' | 'product_list' | 'catalog_message' | 'carousel';
|
|
13663
13734
|
/**
|
|
13664
|
-
* Optional header shown above the body.
|
|
13735
|
+
* Optional header shown above the body. Required with
|
|
13736
|
+
* `type: "text"` for `product_list`; not allowed for `product`
|
|
13737
|
+
* or `carousel`.
|
|
13738
|
+
*
|
|
13665
13739
|
*/
|
|
13666
13740
|
header?: {
|
|
13667
13741
|
type?: 'text' | 'image' | 'video' | 'document';
|
|
@@ -13679,7 +13753,10 @@ export type SendInboxMessageData = {
|
|
|
13679
13753
|
link?: string;
|
|
13680
13754
|
};
|
|
13681
13755
|
};
|
|
13682
|
-
|
|
13756
|
+
/**
|
|
13757
|
+
* Required for every type except `product`, where it is optional.
|
|
13758
|
+
*/
|
|
13759
|
+
body?: {
|
|
13683
13760
|
/**
|
|
13684
13761
|
* Main body text.
|
|
13685
13762
|
*/
|
|
@@ -13795,6 +13872,73 @@ export type SendInboxMessageData = {
|
|
|
13795
13872
|
};
|
|
13796
13873
|
} | {
|
|
13797
13874
|
name: 'send_location';
|
|
13875
|
+
} | {
|
|
13876
|
+
/**
|
|
13877
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13878
|
+
*/
|
|
13879
|
+
catalog_id: string;
|
|
13880
|
+
/**
|
|
13881
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13882
|
+
*/
|
|
13883
|
+
product_retailer_id: string;
|
|
13884
|
+
} | {
|
|
13885
|
+
/**
|
|
13886
|
+
* Meta catalog ID connected to the WhatsApp Business Account.
|
|
13887
|
+
*/
|
|
13888
|
+
catalog_id: string;
|
|
13889
|
+
/**
|
|
13890
|
+
* 1-10 sections. Total products across all sections cannot exceed 30.
|
|
13891
|
+
*/
|
|
13892
|
+
sections: Array<{
|
|
13893
|
+
/**
|
|
13894
|
+
* Optional section header.
|
|
13895
|
+
*/
|
|
13896
|
+
title?: string;
|
|
13897
|
+
product_items: Array<{
|
|
13898
|
+
/**
|
|
13899
|
+
* Retailer ID (SKU) of the product inside the catalog.
|
|
13900
|
+
*/
|
|
13901
|
+
product_retailer_id: string;
|
|
13902
|
+
}>;
|
|
13903
|
+
}>;
|
|
13904
|
+
} | {
|
|
13905
|
+
name: 'catalog_message';
|
|
13906
|
+
parameters?: {
|
|
13907
|
+
/**
|
|
13908
|
+
* Optional product whose image is used as the message thumbnail. Falls back to the first catalog item when omitted.
|
|
13909
|
+
*/
|
|
13910
|
+
thumbnail_product_retailer_id?: string;
|
|
13911
|
+
};
|
|
13912
|
+
} | {
|
|
13913
|
+
cards: Array<{
|
|
13914
|
+
/**
|
|
13915
|
+
* Card position. Auto-filled sequentially when omitted.
|
|
13916
|
+
*/
|
|
13917
|
+
card_index?: number;
|
|
13918
|
+
/**
|
|
13919
|
+
* `product` for a product card; media cards use `cta_url` or a quick-reply type.
|
|
13920
|
+
*/
|
|
13921
|
+
type?: string;
|
|
13922
|
+
/**
|
|
13923
|
+
* Media cards only
|
|
13924
|
+
*/
|
|
13925
|
+
header?: {
|
|
13926
|
+
[key: string]: unknown;
|
|
13927
|
+
};
|
|
13928
|
+
/**
|
|
13929
|
+
* Optional card body text.
|
|
13930
|
+
*/
|
|
13931
|
+
body?: {
|
|
13932
|
+
[key: string]: unknown;
|
|
13933
|
+
};
|
|
13934
|
+
/**
|
|
13935
|
+
* Product cards: `{ catalog_id, product_retailer_id }` (required). Media cards: the card's button action (e.g. `cta_url` with `parameters.display_text` and `parameters.url`).
|
|
13936
|
+
*/
|
|
13937
|
+
action?: {
|
|
13938
|
+
[key: string]: unknown;
|
|
13939
|
+
};
|
|
13940
|
+
[key: string]: unknown | number | string;
|
|
13941
|
+
}>;
|
|
13798
13942
|
});
|
|
13799
13943
|
};
|
|
13800
13944
|
/**
|
|
@@ -15024,6 +15168,18 @@ export type ListInboxMentionsResponse = ({
|
|
|
15024
15168
|
* LinkedIn URN of the person who mentioned you
|
|
15025
15169
|
*/
|
|
15026
15170
|
authorUrn?: (string) | null;
|
|
15171
|
+
/**
|
|
15172
|
+
* Display name of the author, resolved from authorUrn. Null when LinkedIn does not allow resolving the profile.
|
|
15173
|
+
*/
|
|
15174
|
+
authorName?: (string) | null;
|
|
15175
|
+
/**
|
|
15176
|
+
* LinkedIn vanity name of the author (the slug in their profile URL)
|
|
15177
|
+
*/
|
|
15178
|
+
authorUsername?: (string) | null;
|
|
15179
|
+
/**
|
|
15180
|
+
* Profile picture URL of the author. LinkedIn CDN URLs expire after some time, so fetch promptly rather than storing long-term.
|
|
15181
|
+
*/
|
|
15182
|
+
authorPicture?: (string) | null;
|
|
15027
15183
|
/**
|
|
15028
15184
|
* URN of the organization that was mentioned
|
|
15029
15185
|
*/
|