@zernio/node 0.2.482 → 0.2.484
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 +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +5 -5
- package/src/generated/types.gen.ts +21 -4
package/dist/index.d.mts
CHANGED
|
@@ -4222,8 +4222,17 @@ type LinkedInAdsPlatformData = {
|
|
|
4222
4222
|
unitCost?: number;
|
|
4223
4223
|
/**
|
|
4224
4224
|
* Campaign `optimizationTargetType` (e.g. `MAX_CLICK`, `TARGET_COST_PER_CLICK`,
|
|
4225
|
-
* `MAX_IMPRESSION`). Forwarded verbatim
|
|
4226
|
-
* the objective and `costType`. Omit for the objective-derived default
|
|
4225
|
+
* `MAX_IMPRESSION`). Forwarded verbatim, LinkedIn validates compatibility with
|
|
4226
|
+
* the objective and `costType`. Omit for the objective-derived default:
|
|
4227
|
+
* `awareness` gets `MAX_IMPRESSION`, `video_views` gets `MAX_VIDEO_VIEW`, and
|
|
4228
|
+
* every other goal gets `MAX_CLICK`. `lead_generation` and `conversions` also
|
|
4229
|
+
* get `MAX_CLICK`, because `MAX_LEAD` and `MAX_CONVERSION` need a lead gen form
|
|
4230
|
+
* or a conversion rule that neither creation flow attaches. The default applies
|
|
4231
|
+
* only to `SPONSORED_UPDATES` campaigns (every boost, and the image, video and
|
|
4232
|
+
* carousel standalone ads), never to the `TEXT_AD`, `DYNAMIC` and
|
|
4233
|
+
* `SPONSORED_INMAILS` campaigns the other creative formats produce. It is also
|
|
4234
|
+
* skipped when `unitCost` or a non-`CPM` `costType` is set, since those select
|
|
4235
|
+
* manual bidding and the bid is then yours to choose.
|
|
4227
4236
|
*
|
|
4228
4237
|
*/
|
|
4229
4238
|
optimizationTargetType?: string;
|
|
@@ -15654,7 +15663,7 @@ type CreateInboxConversationData = {
|
|
|
15654
15663
|
*/
|
|
15655
15664
|
participantUsername?: string;
|
|
15656
15665
|
/**
|
|
15657
|
-
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required.
|
|
15666
|
+
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message).
|
|
15658
15667
|
*/
|
|
15659
15668
|
message?: string;
|
|
15660
15669
|
/**
|
|
@@ -15662,9 +15671,13 @@ type CreateInboxConversationData = {
|
|
|
15662
15671
|
*/
|
|
15663
15672
|
skipDmCheck?: boolean;
|
|
15664
15673
|
/**
|
|
15665
|
-
* WhatsApp only. Name of the approved template to start the conversation with
|
|
15674
|
+
* WhatsApp only. Name of the approved template to start the conversation with. Required for WhatsApp unless category is used instead (Direct Send). Cannot be combined with category.
|
|
15666
15675
|
*/
|
|
15667
15676
|
templateName?: string;
|
|
15677
|
+
/**
|
|
15678
|
+
* WhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Cannot be combined with templateName (templates are already categorized at creation). Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
15679
|
+
*/
|
|
15680
|
+
category?: 'utility';
|
|
15668
15681
|
/**
|
|
15669
15682
|
* WhatsApp only. Template language code (e.g. en_US).
|
|
15670
15683
|
*/
|
|
@@ -16077,6 +16090,10 @@ type SendInboxMessageData = {
|
|
|
16077
16090
|
* URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead.
|
|
16078
16091
|
*/
|
|
16079
16092
|
attachmentUrl?: string;
|
|
16093
|
+
/**
|
|
16094
|
+
* WhatsApp only (Meta Direct Send). Sends this message as a business-initiated UTILITY message without an approved template, for example outside the 24-hour customer service window; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Supported only for text messages (link preview ok) and interactive messages (reply buttons, CTA URL buttons, voice-call button, header of text/image/video/document). Cannot be combined with template, attachments, location, or contacts. Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
16095
|
+
*/
|
|
16096
|
+
category?: 'utility';
|
|
16080
16097
|
/**
|
|
16081
16098
|
* Type of attachment. Defaults to file if not specified.
|
|
16082
16099
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -4222,8 +4222,17 @@ type LinkedInAdsPlatformData = {
|
|
|
4222
4222
|
unitCost?: number;
|
|
4223
4223
|
/**
|
|
4224
4224
|
* Campaign `optimizationTargetType` (e.g. `MAX_CLICK`, `TARGET_COST_PER_CLICK`,
|
|
4225
|
-
* `MAX_IMPRESSION`). Forwarded verbatim
|
|
4226
|
-
* the objective and `costType`. Omit for the objective-derived default
|
|
4225
|
+
* `MAX_IMPRESSION`). Forwarded verbatim, LinkedIn validates compatibility with
|
|
4226
|
+
* the objective and `costType`. Omit for the objective-derived default:
|
|
4227
|
+
* `awareness` gets `MAX_IMPRESSION`, `video_views` gets `MAX_VIDEO_VIEW`, and
|
|
4228
|
+
* every other goal gets `MAX_CLICK`. `lead_generation` and `conversions` also
|
|
4229
|
+
* get `MAX_CLICK`, because `MAX_LEAD` and `MAX_CONVERSION` need a lead gen form
|
|
4230
|
+
* or a conversion rule that neither creation flow attaches. The default applies
|
|
4231
|
+
* only to `SPONSORED_UPDATES` campaigns (every boost, and the image, video and
|
|
4232
|
+
* carousel standalone ads), never to the `TEXT_AD`, `DYNAMIC` and
|
|
4233
|
+
* `SPONSORED_INMAILS` campaigns the other creative formats produce. It is also
|
|
4234
|
+
* skipped when `unitCost` or a non-`CPM` `costType` is set, since those select
|
|
4235
|
+
* manual bidding and the bid is then yours to choose.
|
|
4227
4236
|
*
|
|
4228
4237
|
*/
|
|
4229
4238
|
optimizationTargetType?: string;
|
|
@@ -15654,7 +15663,7 @@ type CreateInboxConversationData = {
|
|
|
15654
15663
|
*/
|
|
15655
15664
|
participantUsername?: string;
|
|
15656
15665
|
/**
|
|
15657
|
-
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required.
|
|
15666
|
+
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message).
|
|
15658
15667
|
*/
|
|
15659
15668
|
message?: string;
|
|
15660
15669
|
/**
|
|
@@ -15662,9 +15671,13 @@ type CreateInboxConversationData = {
|
|
|
15662
15671
|
*/
|
|
15663
15672
|
skipDmCheck?: boolean;
|
|
15664
15673
|
/**
|
|
15665
|
-
* WhatsApp only. Name of the approved template to start the conversation with
|
|
15674
|
+
* WhatsApp only. Name of the approved template to start the conversation with. Required for WhatsApp unless category is used instead (Direct Send). Cannot be combined with category.
|
|
15666
15675
|
*/
|
|
15667
15676
|
templateName?: string;
|
|
15677
|
+
/**
|
|
15678
|
+
* WhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Cannot be combined with templateName (templates are already categorized at creation). Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
15679
|
+
*/
|
|
15680
|
+
category?: 'utility';
|
|
15668
15681
|
/**
|
|
15669
15682
|
* WhatsApp only. Template language code (e.g. en_US).
|
|
15670
15683
|
*/
|
|
@@ -16077,6 +16090,10 @@ type SendInboxMessageData = {
|
|
|
16077
16090
|
* URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead.
|
|
16078
16091
|
*/
|
|
16079
16092
|
attachmentUrl?: string;
|
|
16093
|
+
/**
|
|
16094
|
+
* WhatsApp only (Meta Direct Send). Sends this message as a business-initiated UTILITY message without an approved template, for example outside the 24-hour customer service window; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Supported only for text messages (link preview ok) and interactive messages (reply buttons, CTA URL buttons, voice-call button, header of text/image/video/document). Cannot be combined with template, attachments, location, or contacts. Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
16095
|
+
*/
|
|
16096
|
+
category?: 'utility';
|
|
16080
16097
|
/**
|
|
16081
16098
|
* Type of attachment. Defaults to file if not specified.
|
|
16082
16099
|
*/
|
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.484",
|
|
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.484",
|
|
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
|
@@ -2887,7 +2887,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
2887
2887
|
*
|
|
2888
2888
|
* Supported platforms: X/Twitter, Bluesky, Reddit, and WhatsApp. Other platforms return PLATFORM_NOT_SUPPORTED.
|
|
2889
2889
|
*
|
|
2890
|
-
* WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. 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. Calling this for a number you already have a thread with simply 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). Template fields are accepted on the JSON body only, not on multipart requests.
|
|
2890
|
+
* WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. 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. Calling this for a number you already have a thread with simply 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). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
2891
2891
|
*
|
|
2892
2892
|
* DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility.
|
|
2893
2893
|
*
|
|
@@ -4128,10 +4128,10 @@ export const listSmsOptOuts = <ThrowOnError extends boolean = false>(options?: O
|
|
|
4128
4128
|
* Constraints: 3-11 characters (letters, digits, spaces; at least one
|
|
4129
4129
|
* letter). Sends cannot reach the US, Canada, or Puerto Rico, are
|
|
4130
4130
|
* text-only, and recipients cannot reply. Sender IDs that impersonate
|
|
4131
|
-
* well-known brands or institutions are rejected
|
|
4132
|
-
*
|
|
4133
|
-
*
|
|
4134
|
-
*
|
|
4131
|
+
* well-known brands or institutions are rejected. Names are not
|
|
4132
|
+
* exclusive: the same sender ID can be registered by any number of
|
|
4133
|
+
* workspaces. Creating the same sender ID again is a no-op
|
|
4134
|
+
* (re-activates it after a delete).
|
|
4135
4135
|
*
|
|
4136
4136
|
*/
|
|
4137
4137
|
export const createSmsSenderId = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateSmsSenderIdData, ThrowOnError>) => {
|
|
@@ -3138,8 +3138,17 @@ export type LinkedInAdsPlatformData = {
|
|
|
3138
3138
|
unitCost?: number;
|
|
3139
3139
|
/**
|
|
3140
3140
|
* Campaign `optimizationTargetType` (e.g. `MAX_CLICK`, `TARGET_COST_PER_CLICK`,
|
|
3141
|
-
* `MAX_IMPRESSION`). Forwarded verbatim
|
|
3142
|
-
* the objective and `costType`. Omit for the objective-derived default
|
|
3141
|
+
* `MAX_IMPRESSION`). Forwarded verbatim, LinkedIn validates compatibility with
|
|
3142
|
+
* the objective and `costType`. Omit for the objective-derived default:
|
|
3143
|
+
* `awareness` gets `MAX_IMPRESSION`, `video_views` gets `MAX_VIDEO_VIEW`, and
|
|
3144
|
+
* every other goal gets `MAX_CLICK`. `lead_generation` and `conversions` also
|
|
3145
|
+
* get `MAX_CLICK`, because `MAX_LEAD` and `MAX_CONVERSION` need a lead gen form
|
|
3146
|
+
* or a conversion rule that neither creation flow attaches. The default applies
|
|
3147
|
+
* only to `SPONSORED_UPDATES` campaigns (every boost, and the image, video and
|
|
3148
|
+
* carousel standalone ads), never to the `TEXT_AD`, `DYNAMIC` and
|
|
3149
|
+
* `SPONSORED_INMAILS` campaigns the other creative formats produce. It is also
|
|
3150
|
+
* skipped when `unitCost` or a non-`CPM` `costType` is set, since those select
|
|
3151
|
+
* manual bidding and the bid is then yours to choose.
|
|
3143
3152
|
*
|
|
3144
3153
|
*/
|
|
3145
3154
|
optimizationTargetType?: string;
|
|
@@ -15314,7 +15323,7 @@ export type CreateInboxConversationData = {
|
|
|
15314
15323
|
*/
|
|
15315
15324
|
participantUsername?: string;
|
|
15316
15325
|
/**
|
|
15317
|
-
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required.
|
|
15326
|
+
* Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message).
|
|
15318
15327
|
*/
|
|
15319
15328
|
message?: string;
|
|
15320
15329
|
/**
|
|
@@ -15322,9 +15331,13 @@ export type CreateInboxConversationData = {
|
|
|
15322
15331
|
*/
|
|
15323
15332
|
skipDmCheck?: boolean;
|
|
15324
15333
|
/**
|
|
15325
|
-
* WhatsApp only. Name of the approved template to start the conversation with
|
|
15334
|
+
* WhatsApp only. Name of the approved template to start the conversation with. Required for WhatsApp unless category is used instead (Direct Send). Cannot be combined with category.
|
|
15326
15335
|
*/
|
|
15327
15336
|
templateName?: string;
|
|
15337
|
+
/**
|
|
15338
|
+
* WhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Cannot be combined with templateName (templates are already categorized at creation). Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
15339
|
+
*/
|
|
15340
|
+
category?: 'utility';
|
|
15328
15341
|
/**
|
|
15329
15342
|
* WhatsApp only. Template language code (e.g. en_US).
|
|
15330
15343
|
*/
|
|
@@ -15752,6 +15765,10 @@ export type SendInboxMessageData = {
|
|
|
15752
15765
|
* URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead.
|
|
15753
15766
|
*/
|
|
15754
15767
|
attachmentUrl?: string;
|
|
15768
|
+
/**
|
|
15769
|
+
* WhatsApp only (Meta Direct Send). Sends this message as a business-initiated UTILITY message without an approved template, for example outside the 24-hour customer service window; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Supported only for text messages (link preview ok) and interactive messages (reply buttons, CTA URL buttons, voice-call button, header of text/image/video/document). Cannot be combined with template, attachments, location, or contacts. Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
|
|
15770
|
+
*/
|
|
15771
|
+
category?: 'utility';
|
|
15755
15772
|
/**
|
|
15756
15773
|
* Type of attachment. Defaults to file if not specified.
|
|
15757
15774
|
*/
|