@zernio/node 0.2.746 → 0.2.748
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 +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +2 -0
- package/src/generated/types.gen.ts +48 -1
package/dist/index.d.mts
CHANGED
|
@@ -21262,6 +21262,53 @@ type CreateInboxConversationData = {
|
|
|
21262
21262
|
*/
|
|
21263
21263
|
value: string;
|
|
21264
21264
|
}>;
|
|
21265
|
+
/**
|
|
21266
|
+
* WhatsApp only. Per-card overrides for a CAROUSEL template, each addressed by the card's card_index. Carousel card body variables restart at {{1}} per card, so they cannot be expressed in the flat templateParams slot order; use this instead. A cardIndex naming a card the approved template does not have, a duplicate cardIndex, or a params count that does not match the card body's token count is rejected with 400 (INVALID_TEMPLATE_CARD_PARAM).
|
|
21267
|
+
*/
|
|
21268
|
+
templateCards?: Array<{
|
|
21269
|
+
/**
|
|
21270
|
+
* The card's card_index in the approved template.
|
|
21271
|
+
*/
|
|
21272
|
+
cardIndex: number;
|
|
21273
|
+
/**
|
|
21274
|
+
* Values for this card's own body variables, in the card's own {{1}}, {{2}}, ... order (or named-slot order of appearance).
|
|
21275
|
+
*/
|
|
21276
|
+
params?: Array<(string)>;
|
|
21277
|
+
/**
|
|
21278
|
+
* Overrides this card's header asset for THIS send. Without it, the card's approved sample asset is sent.
|
|
21279
|
+
*/
|
|
21280
|
+
headerMedia?: {
|
|
21281
|
+
/**
|
|
21282
|
+
* Must match the card header's media type.
|
|
21283
|
+
*/
|
|
21284
|
+
type: 'image' | 'video' | 'document';
|
|
21285
|
+
/**
|
|
21286
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
21287
|
+
*/
|
|
21288
|
+
link?: string;
|
|
21289
|
+
/**
|
|
21290
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
21291
|
+
*/
|
|
21292
|
+
id?: string;
|
|
21293
|
+
};
|
|
21294
|
+
/**
|
|
21295
|
+
* Values for this card's own buttons, each addressed by the button's index within the card.
|
|
21296
|
+
*/
|
|
21297
|
+
buttons?: Array<{
|
|
21298
|
+
/**
|
|
21299
|
+
* Zero-based position of the button within the card's buttons.
|
|
21300
|
+
*/
|
|
21301
|
+
index: number;
|
|
21302
|
+
/**
|
|
21303
|
+
* The button kind, which decides how the value is sent.
|
|
21304
|
+
*/
|
|
21305
|
+
subType: 'quick_reply' | 'url';
|
|
21306
|
+
/**
|
|
21307
|
+
* The value to send (quick_reply payload, or the URL dynamic suffix).
|
|
21308
|
+
*/
|
|
21309
|
+
value: string;
|
|
21310
|
+
}>;
|
|
21311
|
+
}>;
|
|
21265
21312
|
/**
|
|
21266
21313
|
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
21267
21314
|
*/
|
|
@@ -21333,7 +21380,7 @@ type CreateInboxConversationResponse = ({
|
|
|
21333
21380
|
});
|
|
21334
21381
|
type CreateInboxConversationError = ({
|
|
21335
21382
|
error?: string;
|
|
21336
|
-
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
21383
|
+
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'INVALID_TEMPLATE_CARD_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
21337
21384
|
} | {
|
|
21338
21385
|
error?: string;
|
|
21339
21386
|
} | unknown | {
|
package/dist/index.d.ts
CHANGED
|
@@ -21262,6 +21262,53 @@ type CreateInboxConversationData = {
|
|
|
21262
21262
|
*/
|
|
21263
21263
|
value: string;
|
|
21264
21264
|
}>;
|
|
21265
|
+
/**
|
|
21266
|
+
* WhatsApp only. Per-card overrides for a CAROUSEL template, each addressed by the card's card_index. Carousel card body variables restart at {{1}} per card, so they cannot be expressed in the flat templateParams slot order; use this instead. A cardIndex naming a card the approved template does not have, a duplicate cardIndex, or a params count that does not match the card body's token count is rejected with 400 (INVALID_TEMPLATE_CARD_PARAM).
|
|
21267
|
+
*/
|
|
21268
|
+
templateCards?: Array<{
|
|
21269
|
+
/**
|
|
21270
|
+
* The card's card_index in the approved template.
|
|
21271
|
+
*/
|
|
21272
|
+
cardIndex: number;
|
|
21273
|
+
/**
|
|
21274
|
+
* Values for this card's own body variables, in the card's own {{1}}, {{2}}, ... order (or named-slot order of appearance).
|
|
21275
|
+
*/
|
|
21276
|
+
params?: Array<(string)>;
|
|
21277
|
+
/**
|
|
21278
|
+
* Overrides this card's header asset for THIS send. Without it, the card's approved sample asset is sent.
|
|
21279
|
+
*/
|
|
21280
|
+
headerMedia?: {
|
|
21281
|
+
/**
|
|
21282
|
+
* Must match the card header's media type.
|
|
21283
|
+
*/
|
|
21284
|
+
type: 'image' | 'video' | 'document';
|
|
21285
|
+
/**
|
|
21286
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
21287
|
+
*/
|
|
21288
|
+
link?: string;
|
|
21289
|
+
/**
|
|
21290
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
21291
|
+
*/
|
|
21292
|
+
id?: string;
|
|
21293
|
+
};
|
|
21294
|
+
/**
|
|
21295
|
+
* Values for this card's own buttons, each addressed by the button's index within the card.
|
|
21296
|
+
*/
|
|
21297
|
+
buttons?: Array<{
|
|
21298
|
+
/**
|
|
21299
|
+
* Zero-based position of the button within the card's buttons.
|
|
21300
|
+
*/
|
|
21301
|
+
index: number;
|
|
21302
|
+
/**
|
|
21303
|
+
* The button kind, which decides how the value is sent.
|
|
21304
|
+
*/
|
|
21305
|
+
subType: 'quick_reply' | 'url';
|
|
21306
|
+
/**
|
|
21307
|
+
* The value to send (quick_reply payload, or the URL dynamic suffix).
|
|
21308
|
+
*/
|
|
21309
|
+
value: string;
|
|
21310
|
+
}>;
|
|
21311
|
+
}>;
|
|
21265
21312
|
/**
|
|
21266
21313
|
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
21267
21314
|
*/
|
|
@@ -21333,7 +21380,7 @@ type CreateInboxConversationResponse = ({
|
|
|
21333
21380
|
});
|
|
21334
21381
|
type CreateInboxConversationError = ({
|
|
21335
21382
|
error?: string;
|
|
21336
|
-
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
21383
|
+
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'INVALID_TEMPLATE_CARD_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
21337
21384
|
} | {
|
|
21338
21385
|
error?: string;
|
|
21339
21386
|
} | unknown | {
|
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: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.748",
|
|
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: "@zernio/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.748",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -3591,6 +3591,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
3591
3591
|
* - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send.
|
|
3592
3592
|
* - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied.
|
|
3593
3593
|
* - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only.
|
|
3594
|
+
* - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order.
|
|
3594
3595
|
* - Template fields are accepted on the JSON body only, not on multipart requests.
|
|
3595
3596
|
*
|
|
3596
3597
|
* For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages).
|
|
@@ -9985,6 +9986,7 @@ export const listGoogleAssetGroups = <ThrowOnError extends boolean = false>(opti
|
|
|
9985
9986
|
* request with Google without creating or persisting resources. Read assets with
|
|
9986
9987
|
* `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is
|
|
9987
9988
|
* optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation.
|
|
9989
|
+
* All supplied asset links are validated together against Google's minimum asset requirements.
|
|
9988
9990
|
* PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields
|
|
9989
9991
|
* and attach shapes. Geo and language targeting are supported; omitted geo targets
|
|
9990
9992
|
* all locations. PMax does not require top-level goal, headline, body or linkUrl.
|
|
@@ -20751,6 +20751,53 @@ export type CreateInboxConversationData = {
|
|
|
20751
20751
|
*/
|
|
20752
20752
|
value: string;
|
|
20753
20753
|
}>;
|
|
20754
|
+
/**
|
|
20755
|
+
* WhatsApp only. Per-card overrides for a CAROUSEL template, each addressed by the card's card_index. Carousel card body variables restart at {{1}} per card, so they cannot be expressed in the flat templateParams slot order; use this instead. A cardIndex naming a card the approved template does not have, a duplicate cardIndex, or a params count that does not match the card body's token count is rejected with 400 (INVALID_TEMPLATE_CARD_PARAM).
|
|
20756
|
+
*/
|
|
20757
|
+
templateCards?: Array<{
|
|
20758
|
+
/**
|
|
20759
|
+
* The card's card_index in the approved template.
|
|
20760
|
+
*/
|
|
20761
|
+
cardIndex: number;
|
|
20762
|
+
/**
|
|
20763
|
+
* Values for this card's own body variables, in the card's own {{1}}, {{2}}, ... order (or named-slot order of appearance).
|
|
20764
|
+
*/
|
|
20765
|
+
params?: Array<(string)>;
|
|
20766
|
+
/**
|
|
20767
|
+
* Overrides this card's header asset for THIS send. Without it, the card's approved sample asset is sent.
|
|
20768
|
+
*/
|
|
20769
|
+
headerMedia?: {
|
|
20770
|
+
/**
|
|
20771
|
+
* Must match the card header's media type.
|
|
20772
|
+
*/
|
|
20773
|
+
type: 'image' | 'video' | 'document';
|
|
20774
|
+
/**
|
|
20775
|
+
* Public URL of the asset to send. Must be reachable without auth.
|
|
20776
|
+
*/
|
|
20777
|
+
link?: string;
|
|
20778
|
+
/**
|
|
20779
|
+
* A Meta media id (from the media upload endpoint), as an alternative to link.
|
|
20780
|
+
*/
|
|
20781
|
+
id?: string;
|
|
20782
|
+
};
|
|
20783
|
+
/**
|
|
20784
|
+
* Values for this card's own buttons, each addressed by the button's index within the card.
|
|
20785
|
+
*/
|
|
20786
|
+
buttons?: Array<{
|
|
20787
|
+
/**
|
|
20788
|
+
* Zero-based position of the button within the card's buttons.
|
|
20789
|
+
*/
|
|
20790
|
+
index: number;
|
|
20791
|
+
/**
|
|
20792
|
+
* The button kind, which decides how the value is sent.
|
|
20793
|
+
*/
|
|
20794
|
+
subType: 'quick_reply' | 'url';
|
|
20795
|
+
/**
|
|
20796
|
+
* The value to send (quick_reply payload, or the URL dynamic suffix).
|
|
20797
|
+
*/
|
|
20798
|
+
value: string;
|
|
20799
|
+
}>;
|
|
20800
|
+
}>;
|
|
20754
20801
|
/**
|
|
20755
20802
|
* WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
|
|
20756
20803
|
*/
|
|
@@ -20824,7 +20871,7 @@ export type CreateInboxConversationResponse = ({
|
|
|
20824
20871
|
|
|
20825
20872
|
export type CreateInboxConversationError = ({
|
|
20826
20873
|
error?: string;
|
|
20827
|
-
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
20874
|
+
code?: 'PLATFORM_NOT_SUPPORTED' | 'PLATFORM_LIMITATION' | 'TEMPLATE_REQUIRED' | 'INVALID_TEMPLATE_PARAMS' | 'INVALID_TEMPLATE_BUTTON_PARAM' | 'INVALID_TEMPLATE_CARD_PARAM' | 'DIRECT_SEND_NOT_ELIGIBLE' | 'DIRECT_SEND_LIMITED' | 'DIRECT_SEND_BLOCKED';
|
|
20828
20875
|
} | {
|
|
20829
20876
|
error?: string;
|
|
20830
20877
|
} | unknown | {
|