@sendly/node 3.13.1 → 3.15.1

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
@@ -54,6 +54,11 @@ interface SendMessageRequest {
54
54
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
55
55
  */
56
56
  messageType?: MessageType;
57
+ /**
58
+ * Custom JSON metadata to attach to the message (max 4KB).
59
+ * Stored on the message record and included in webhook event payloads.
60
+ */
61
+ metadata?: Record<string, any>;
57
62
  }
58
63
  /**
59
64
  * Message status values
@@ -135,6 +140,10 @@ interface Message {
135
140
  * ISO 8601 timestamp when the message was delivered (if applicable)
136
141
  */
137
142
  deliveredAt?: string | null;
143
+ /**
144
+ * Custom JSON metadata attached to the message
145
+ */
146
+ metadata?: Record<string, any>;
138
147
  }
139
148
  /**
140
149
  * Options for listing messages
@@ -195,6 +204,11 @@ interface ScheduleMessageRequest {
195
204
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
196
205
  */
197
206
  messageType?: MessageType;
207
+ /**
208
+ * Custom JSON metadata to attach to the message (max 4KB).
209
+ * Stored on the message record and included in webhook event payloads.
210
+ */
211
+ metadata?: Record<string, any>;
198
212
  }
199
213
  /**
200
214
  * Scheduled message status values
@@ -334,6 +348,11 @@ interface BatchMessageRequest {
334
348
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
335
349
  */
336
350
  messageType?: MessageType;
351
+ /**
352
+ * Custom JSON metadata to attach to all messages in the batch (max 4KB).
353
+ * Stored on each message record and included in webhook event payloads.
354
+ */
355
+ metadata?: Record<string, any>;
337
356
  }
338
357
  /**
339
358
  * Result for a single message in a batch
package/dist/index.d.ts CHANGED
@@ -54,6 +54,11 @@ interface SendMessageRequest {
54
54
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
55
55
  */
56
56
  messageType?: MessageType;
57
+ /**
58
+ * Custom JSON metadata to attach to the message (max 4KB).
59
+ * Stored on the message record and included in webhook event payloads.
60
+ */
61
+ metadata?: Record<string, any>;
57
62
  }
58
63
  /**
59
64
  * Message status values
@@ -135,6 +140,10 @@ interface Message {
135
140
  * ISO 8601 timestamp when the message was delivered (if applicable)
136
141
  */
137
142
  deliveredAt?: string | null;
143
+ /**
144
+ * Custom JSON metadata attached to the message
145
+ */
146
+ metadata?: Record<string, any>;
138
147
  }
139
148
  /**
140
149
  * Options for listing messages
@@ -195,6 +204,11 @@ interface ScheduleMessageRequest {
195
204
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
196
205
  */
197
206
  messageType?: MessageType;
207
+ /**
208
+ * Custom JSON metadata to attach to the message (max 4KB).
209
+ * Stored on the message record and included in webhook event payloads.
210
+ */
211
+ metadata?: Record<string, any>;
198
212
  }
199
213
  /**
200
214
  * Scheduled message status values
@@ -334,6 +348,11 @@ interface BatchMessageRequest {
334
348
  * - "transactional": OTPs, confirmations, alerts - bypasses quiet hours (24/7)
335
349
  */
336
350
  messageType?: MessageType;
351
+ /**
352
+ * Custom JSON metadata to attach to all messages in the batch (max 4KB).
353
+ * Stored on each message record and included in webhook event payloads.
354
+ */
355
+ metadata?: Record<string, any>;
337
356
  }
338
357
  /**
339
358
  * Result for a single message in a batch
package/dist/index.js CHANGED
@@ -639,7 +639,8 @@ var MessagesResource = class {
639
639
  to: request.to,
640
640
  text: request.text,
641
641
  ...request.from && { from: request.from },
642
- ...request.messageType && { messageType: request.messageType }
642
+ ...request.messageType && { messageType: request.messageType },
643
+ ...request.metadata && { metadata: request.metadata }
643
644
  }
644
645
  });
645
646
  return message;
@@ -804,7 +805,8 @@ var MessagesResource = class {
804
805
  text: request.text,
805
806
  scheduledAt: request.scheduledAt,
806
807
  ...request.from && { from: request.from },
807
- ...request.messageType && { messageType: request.messageType }
808
+ ...request.messageType && { messageType: request.messageType },
809
+ ...request.metadata && { metadata: request.metadata }
808
810
  }
809
811
  });
810
812
  return scheduled;
@@ -928,7 +930,8 @@ var MessagesResource = class {
928
930
  body: {
929
931
  messages: request.messages,
930
932
  ...request.from && { from: request.from },
931
- ...request.messageType && { messageType: request.messageType }
933
+ ...request.messageType && { messageType: request.messageType },
934
+ ...request.metadata && { metadata: request.metadata }
932
935
  }
933
936
  });
934
937
  return batch;
package/dist/index.mjs CHANGED
@@ -579,7 +579,8 @@ var MessagesResource = class {
579
579
  to: request.to,
580
580
  text: request.text,
581
581
  ...request.from && { from: request.from },
582
- ...request.messageType && { messageType: request.messageType }
582
+ ...request.messageType && { messageType: request.messageType },
583
+ ...request.metadata && { metadata: request.metadata }
583
584
  }
584
585
  });
585
586
  return message;
@@ -744,7 +745,8 @@ var MessagesResource = class {
744
745
  text: request.text,
745
746
  scheduledAt: request.scheduledAt,
746
747
  ...request.from && { from: request.from },
747
- ...request.messageType && { messageType: request.messageType }
748
+ ...request.messageType && { messageType: request.messageType },
749
+ ...request.metadata && { metadata: request.metadata }
748
750
  }
749
751
  });
750
752
  return scheduled;
@@ -868,7 +870,8 @@ var MessagesResource = class {
868
870
  body: {
869
871
  messages: request.messages,
870
872
  ...request.from && { from: request.from },
871
- ...request.messageType && { messageType: request.messageType }
873
+ ...request.messageType && { messageType: request.messageType },
874
+ ...request.metadata && { metadata: request.metadata }
872
875
  }
873
876
  });
874
877
  return batch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendly/node",
3
- "version": "3.13.1",
3
+ "version": "3.15.1",
4
4
  "description": "Official Sendly Node.js SDK for SMS messaging",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",