@zernio/node 0.2.155 → 0.2.156

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
@@ -13130,6 +13130,38 @@ type GetBroadcastError = ({
13130
13130
  error?: string;
13131
13131
  });
13132
13132
  type UpdateBroadcastData = {
13133
+ body?: {
13134
+ name?: string;
13135
+ description?: string;
13136
+ /**
13137
+ * Generic message payload (used for non-WhatsApp platforms).
13138
+ */
13139
+ message?: {
13140
+ text?: string;
13141
+ };
13142
+ /**
13143
+ * WhatsApp template payload (used when platform is `whatsapp`).
13144
+ */
13145
+ template?: {
13146
+ name?: string;
13147
+ language?: string;
13148
+ /**
13149
+ * Maps template variable positions to contact fields. Keys are position strings ("1", "2"); values are { field, customValue }.
13150
+ */
13151
+ variableMapping?: {
13152
+ [key: string]: {
13153
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13154
+ customValue?: string;
13155
+ };
13156
+ };
13157
+ };
13158
+ /**
13159
+ * Recipient segment filters (tags, channels, subscription state).
13160
+ */
13161
+ segmentFilters?: {
13162
+ [key: string]: unknown;
13163
+ };
13164
+ };
13133
13165
  path: {
13134
13166
  broadcastId: string;
13135
13167
  };
@@ -13425,6 +13457,32 @@ type GetSequenceError = ({
13425
13457
  error?: string;
13426
13458
  });
13427
13459
  type UpdateSequenceData = {
13460
+ body?: {
13461
+ name?: string;
13462
+ description?: string;
13463
+ /**
13464
+ * Replace the full step list. Only allowed while the sequence is draft or paused.
13465
+ */
13466
+ steps?: Array<{
13467
+ order: number;
13468
+ delayMinutes: number;
13469
+ message?: {
13470
+ text?: string;
13471
+ };
13472
+ template?: {
13473
+ name?: string;
13474
+ language?: string;
13475
+ variableMapping?: {
13476
+ [key: string]: {
13477
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13478
+ customValue?: string;
13479
+ };
13480
+ };
13481
+ };
13482
+ }>;
13483
+ exitOnReply?: boolean;
13484
+ exitOnUnsubscribe?: boolean;
13485
+ };
13428
13486
  path: {
13429
13487
  sequenceId: string;
13430
13488
  };
package/dist/index.d.ts CHANGED
@@ -13130,6 +13130,38 @@ type GetBroadcastError = ({
13130
13130
  error?: string;
13131
13131
  });
13132
13132
  type UpdateBroadcastData = {
13133
+ body?: {
13134
+ name?: string;
13135
+ description?: string;
13136
+ /**
13137
+ * Generic message payload (used for non-WhatsApp platforms).
13138
+ */
13139
+ message?: {
13140
+ text?: string;
13141
+ };
13142
+ /**
13143
+ * WhatsApp template payload (used when platform is `whatsapp`).
13144
+ */
13145
+ template?: {
13146
+ name?: string;
13147
+ language?: string;
13148
+ /**
13149
+ * Maps template variable positions to contact fields. Keys are position strings ("1", "2"); values are { field, customValue }.
13150
+ */
13151
+ variableMapping?: {
13152
+ [key: string]: {
13153
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13154
+ customValue?: string;
13155
+ };
13156
+ };
13157
+ };
13158
+ /**
13159
+ * Recipient segment filters (tags, channels, subscription state).
13160
+ */
13161
+ segmentFilters?: {
13162
+ [key: string]: unknown;
13163
+ };
13164
+ };
13133
13165
  path: {
13134
13166
  broadcastId: string;
13135
13167
  };
@@ -13425,6 +13457,32 @@ type GetSequenceError = ({
13425
13457
  error?: string;
13426
13458
  });
13427
13459
  type UpdateSequenceData = {
13460
+ body?: {
13461
+ name?: string;
13462
+ description?: string;
13463
+ /**
13464
+ * Replace the full step list. Only allowed while the sequence is draft or paused.
13465
+ */
13466
+ steps?: Array<{
13467
+ order: number;
13468
+ delayMinutes: number;
13469
+ message?: {
13470
+ text?: string;
13471
+ };
13472
+ template?: {
13473
+ name?: string;
13474
+ language?: string;
13475
+ variableMapping?: {
13476
+ [key: string]: {
13477
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13478
+ customValue?: string;
13479
+ };
13480
+ };
13481
+ };
13482
+ }>;
13483
+ exitOnReply?: boolean;
13484
+ exitOnUnsubscribe?: boolean;
13485
+ };
13428
13486
  path: {
13429
13487
  sequenceId: string;
13430
13488
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.155",
3
+ "version": "0.2.156",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -3190,7 +3190,7 @@ export const getSequence = <ThrowOnError extends boolean = false>(options: Optio
3190
3190
 
3191
3191
  /**
3192
3192
  * Update sequence
3193
- * Update a sequence's name, steps, or exit conditions. Active sequences can be updated without pausing.
3193
+ * Update a sequence's name, steps, or exit conditions. Steps can only be modified while the sequence is draft or paused.
3194
3194
  */
3195
3195
  export const updateSequence = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateSequenceData, ThrowOnError>) => {
3196
3196
  return (options?.client ?? client).patch<UpdateSequenceResponse, UpdateSequenceError, ThrowOnError>({
@@ -13355,6 +13355,38 @@ export type GetBroadcastError = ({
13355
13355
  });
13356
13356
 
13357
13357
  export type UpdateBroadcastData = {
13358
+ body?: {
13359
+ name?: string;
13360
+ description?: string;
13361
+ /**
13362
+ * Generic message payload (used for non-WhatsApp platforms).
13363
+ */
13364
+ message?: {
13365
+ text?: string;
13366
+ };
13367
+ /**
13368
+ * WhatsApp template payload (used when platform is `whatsapp`).
13369
+ */
13370
+ template?: {
13371
+ name?: string;
13372
+ language?: string;
13373
+ /**
13374
+ * Maps template variable positions to contact fields. Keys are position strings ("1", "2"); values are { field, customValue }.
13375
+ */
13376
+ variableMapping?: {
13377
+ [key: string]: {
13378
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13379
+ customValue?: string;
13380
+ };
13381
+ };
13382
+ };
13383
+ /**
13384
+ * Recipient segment filters (tags, channels, subscription state).
13385
+ */
13386
+ segmentFilters?: {
13387
+ [key: string]: unknown;
13388
+ };
13389
+ };
13358
13390
  path: {
13359
13391
  broadcastId: string;
13360
13392
  };
@@ -13680,6 +13712,32 @@ export type GetSequenceError = ({
13680
13712
  });
13681
13713
 
13682
13714
  export type UpdateSequenceData = {
13715
+ body?: {
13716
+ name?: string;
13717
+ description?: string;
13718
+ /**
13719
+ * Replace the full step list. Only allowed while the sequence is draft or paused.
13720
+ */
13721
+ steps?: Array<{
13722
+ order: number;
13723
+ delayMinutes: number;
13724
+ message?: {
13725
+ text?: string;
13726
+ };
13727
+ template?: {
13728
+ name?: string;
13729
+ language?: string;
13730
+ variableMapping?: {
13731
+ [key: string]: {
13732
+ field?: 'name' | 'phone' | 'email' | 'company' | 'custom';
13733
+ customValue?: string;
13734
+ };
13735
+ };
13736
+ };
13737
+ }>;
13738
+ exitOnReply?: boolean;
13739
+ exitOnUnsubscribe?: boolean;
13740
+ };
13683
13741
  path: {
13684
13742
  sequenceId: string;
13685
13743
  };