@unlimited-messaging/sdk 0.1.29 → 0.1.30

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.
Files changed (21) hide show
  1. package/package.json +1 -1
  2. package/src/api/resources/messages/client/Client.d.ts +1 -1
  3. package/src/api/resources/messages/client/Client.js +1 -1
  4. package/src/api/resources/messages/types/MessageFindAllResponseDataItem.d.ts +1 -1
  5. package/src/api/resources/messages/types/MessageFindOneResponse.d.ts +1 -1
  6. package/src/api/resources/messages/types/MessageSendResponse.d.ts +1 -1
  7. package/src/api/resources/messages/types/MessageSendResponseMessagesItem.d.ts +1 -1
  8. package/src/api/resources/webhooks/client/Client.d.ts +6 -0
  9. package/src/api/resources/webhooks/client/Client.js +6 -0
  10. package/src/api/resources/webhooks/types/WebhookEndpointCreateResponse.d.ts +2 -0
  11. package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponse.d.ts +2 -0
  12. package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItem.d.ts +2 -0
  13. package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponse.d.ts +2 -0
  14. package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponse.d.ts +2 -0
  15. package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponse.js +2 -0
  16. package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponse.d.ts +2 -0
  17. package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponse.js +2 -0
  18. package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItem.d.ts +2 -0
  19. package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItem.js +2 -0
  20. package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponse.d.ts +2 -0
  21. package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponse.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlimited-messaging/sdk",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "TypeScript / Node.js SDK for the Unlimited Messaging API — send and receive WhatsApp messages programmatically",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -60,7 +60,7 @@ export declare class Messages {
60
60
  *
61
61
  * WhatsApp text is limited to 1 600 characters. `simId` is a deprecated alias for `accountId`, removed 2026-12-16.
62
62
  *
63
- * Watermark: on the paid plans (Medium, Max) nothing is ever added to your messages. On the Free plan, a text message (WhatsApp) or an email ends with a "Sent with UnlimitedMessaging.app" line; media and product messages never do. `watermarked` on the message says whether it was added.
63
+ * Watermark: on the paid plans (Medium, Max) nothing is ever added to your messages. On the Free plan, a text message (WhatsApp, SMS) or an email ends with a "Sent with UnlimitedMessaging.app" line; media and product messages never do. The line is part of the stored message: `content` (and an email's `contentHtml`) is exactly what was sent, and `watermarked` says whether it was added.
64
64
  *
65
65
  * @param {UnlimitedMessagingApi.MessageSendRequest} request
66
66
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
@@ -186,7 +186,7 @@ class Messages {
186
186
  *
187
187
  * WhatsApp text is limited to 1 600 characters. `simId` is a deprecated alias for `accountId`, removed 2026-12-16.
188
188
  *
189
- * Watermark: on the paid plans (Medium, Max) nothing is ever added to your messages. On the Free plan, a text message (WhatsApp) or an email ends with a "Sent with UnlimitedMessaging.app" line; media and product messages never do. `watermarked` on the message says whether it was added.
189
+ * Watermark: on the paid plans (Medium, Max) nothing is ever added to your messages. On the Free plan, a text message (WhatsApp, SMS) or an email ends with a "Sent with UnlimitedMessaging.app" line; media and product messages never do. The line is part of the stored message: `content` (and an email's `contentHtml`) is exactly what was sent, and `watermarked` says whether it was added.
190
190
  *
191
191
  * @param {UnlimitedMessagingApi.MessageSendRequest} request
192
192
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
@@ -29,7 +29,7 @@ export interface MessageFindAllResponseDataItem {
29
29
  status: UnlimitedMessagingApi.MessageFindAllResponseDataItemStatus;
30
30
  channel: UnlimitedMessagingApi.MessageFindAllResponseDataItemChannel;
31
31
  accountChannel: UnlimitedMessagingApi.MessageFindAllResponseDataItemAccountChannel;
32
- /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. */
32
+ /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. When true, the line is already part of `content` (and `contentHtml`), as sent. */
33
33
  watermarked: boolean;
34
34
  /** The email subject. Null on channels without one. */
35
35
  subject: string | null;
@@ -29,7 +29,7 @@ export interface MessageFindOneResponse {
29
29
  status: UnlimitedMessagingApi.MessageFindOneResponseStatus;
30
30
  channel: UnlimitedMessagingApi.MessageFindOneResponseChannel;
31
31
  accountChannel: UnlimitedMessagingApi.MessageFindOneResponseAccountChannel;
32
- /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. */
32
+ /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. When true, the line is already part of `content` (and `contentHtml`), as sent. */
33
33
  watermarked: boolean;
34
34
  /** The email subject. Null on channels without one. */
35
35
  subject: string | null;
@@ -29,7 +29,7 @@ export interface MessageSendResponse {
29
29
  status: UnlimitedMessagingApi.MessageSendResponseStatus;
30
30
  channel: UnlimitedMessagingApi.MessageSendResponseChannel;
31
31
  accountChannel: UnlimitedMessagingApi.MessageSendResponseAccountChannel;
32
- /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. */
32
+ /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. When true, the line is already part of `content` (and `contentHtml`), as sent. */
33
33
  watermarked: boolean;
34
34
  /** The email subject. Null on channels without one. */
35
35
  subject: string | null;
@@ -29,7 +29,7 @@ export interface MessageSendResponseMessagesItem {
29
29
  status: UnlimitedMessagingApi.MessageSendResponseMessagesItemStatus;
30
30
  channel: UnlimitedMessagingApi.MessageSendResponseMessagesItemChannel;
31
31
  accountChannel: UnlimitedMessagingApi.MessageSendResponseMessagesItemAccountChannel;
32
- /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. */
32
+ /** Whether the "Sent with UnlimitedMessaging.app" line was appended. Never on the paid plans (Medium, Max), nor on media and product messages; on the Free plan, text messages and emails only. When true, the line is already part of `content` (and `contentHtml`), as sent. */
33
33
  watermarked: boolean;
34
34
  /** The email subject. Null on channels without one. */
35
35
  subject: string | null;
@@ -64,6 +64,12 @@ export declare namespace Webhooks {
64
64
  * after 30 s, 2 min, 10 min, 1 h, 6 h, 1 day, 2 days: 8 attempts in all, over a little more than 3 days. Any other
65
65
  * `4xx` is final and never retried. Delivery attempts are kept for 30 days.
66
66
  *
67
+ * When every delivery to an endpoint keeps failing, each event is retried less: 2 retries after 1 day, 1 retry after 2 days, no retry after 3 days
68
+ * without a single successful delivery. After 7 days the endpoint is turned off
69
+ * (`enabled: false`, with `autoDisabledAt` set) and its owner is emailed; events that happen while it
70
+ * is off are not sent. `failingSince` on the endpoint shows since when nothing has gone through. Any
71
+ * successful delivery, or turning the endpoint back on, starts over with the full schedule.
72
+ *
67
73
  * ### Ordering and duplicates
68
74
  *
69
75
  * Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (equal to
@@ -97,6 +97,12 @@ const errors = __importStar(require("../../../../errors/index"));
97
97
  * after 30 s, 2 min, 10 min, 1 h, 6 h, 1 day, 2 days: 8 attempts in all, over a little more than 3 days. Any other
98
98
  * `4xx` is final and never retried. Delivery attempts are kept for 30 days.
99
99
  *
100
+ * When every delivery to an endpoint keeps failing, each event is retried less: 2 retries after 1 day, 1 retry after 2 days, no retry after 3 days
101
+ * without a single successful delivery. After 7 days the endpoint is turned off
102
+ * (`enabled: false`, with `autoDisabledAt` set) and its owner is emailed; events that happen while it
103
+ * is off are not sent. `failingSince` on the endpoint shows since when nothing has gone through. Any
104
+ * successful delivery, or turning the endpoint back on, starts over with the full schedule.
105
+ *
100
106
  * ### Ordering and duplicates
101
107
  *
102
108
  * Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (equal to
@@ -8,6 +8,8 @@ export interface WebhookEndpointCreateResponse {
8
8
  description: string | null;
9
9
  secretPrefix: string;
10
10
  enabled: boolean;
11
+ autoDisabledAt: Date | null;
12
+ failingSince: Date | null;
11
13
  eventTypes: UnlimitedMessagingApi.WebhookEndpointCreateResponseEventTypesItem[];
12
14
  accountIds: string[];
13
15
  createdAt: Date;
@@ -8,6 +8,8 @@ export interface WebhookEndpointFindOneResponse {
8
8
  description: string | null;
9
9
  secretPrefix: string;
10
10
  enabled: boolean;
11
+ autoDisabledAt: Date | null;
12
+ failingSince: Date | null;
11
13
  eventTypes: UnlimitedMessagingApi.WebhookEndpointFindOneResponseEventTypesItem[];
12
14
  accountIds: string[];
13
15
  createdAt: Date;
@@ -8,6 +8,8 @@ export interface WebhookEndpointListResponseDataItem {
8
8
  description: string | null;
9
9
  secretPrefix: string;
10
10
  enabled: boolean;
11
+ autoDisabledAt: Date | null;
12
+ failingSince: Date | null;
11
13
  eventTypes: UnlimitedMessagingApi.WebhookEndpointListResponseDataItemEventTypesItem[];
12
14
  accountIds: string[];
13
15
  createdAt: Date;
@@ -8,6 +8,8 @@ export interface WebhookEndpointUpdateResponse {
8
8
  description: string | null;
9
9
  secretPrefix: string;
10
10
  enabled: boolean;
11
+ autoDisabledAt: Date | null;
12
+ failingSince: Date | null;
11
13
  eventTypes: UnlimitedMessagingApi.WebhookEndpointUpdateResponseEventTypesItem[];
12
14
  accountIds: string[];
13
15
  createdAt: Date;
@@ -13,6 +13,8 @@ export declare namespace WebhookEndpointCreateResponse {
13
13
  description: string | null;
14
14
  secretPrefix: string;
15
15
  enabled: boolean;
16
+ autoDisabledAt: string | null;
17
+ failingSince: string | null;
16
18
  eventTypes: WebhookEndpointCreateResponseEventTypesItem.Raw[];
17
19
  accountIds: string[];
18
20
  createdAt: string;
@@ -45,6 +45,8 @@ exports.WebhookEndpointCreateResponse = core.serialization.object({
45
45
  description: core.serialization.string().nullable(),
46
46
  secretPrefix: core.serialization.string(),
47
47
  enabled: core.serialization.boolean(),
48
+ autoDisabledAt: core.serialization.date().nullable(),
49
+ failingSince: core.serialization.date().nullable(),
48
50
  eventTypes: core.serialization.list(WebhookEndpointCreateResponseEventTypesItem_1.WebhookEndpointCreateResponseEventTypesItem),
49
51
  accountIds: core.serialization.list(core.serialization.string()),
50
52
  createdAt: core.serialization.date(),
@@ -13,6 +13,8 @@ export declare namespace WebhookEndpointFindOneResponse {
13
13
  description: string | null;
14
14
  secretPrefix: string;
15
15
  enabled: boolean;
16
+ autoDisabledAt: string | null;
17
+ failingSince: string | null;
16
18
  eventTypes: WebhookEndpointFindOneResponseEventTypesItem.Raw[];
17
19
  accountIds: string[];
18
20
  createdAt: string;
@@ -45,6 +45,8 @@ exports.WebhookEndpointFindOneResponse = core.serialization.object({
45
45
  description: core.serialization.string().nullable(),
46
46
  secretPrefix: core.serialization.string(),
47
47
  enabled: core.serialization.boolean(),
48
+ autoDisabledAt: core.serialization.date().nullable(),
49
+ failingSince: core.serialization.date().nullable(),
48
50
  eventTypes: core.serialization.list(WebhookEndpointFindOneResponseEventTypesItem_1.WebhookEndpointFindOneResponseEventTypesItem),
49
51
  accountIds: core.serialization.list(core.serialization.string()),
50
52
  createdAt: core.serialization.date(),
@@ -13,6 +13,8 @@ export declare namespace WebhookEndpointListResponseDataItem {
13
13
  description: string | null;
14
14
  secretPrefix: string;
15
15
  enabled: boolean;
16
+ autoDisabledAt: string | null;
17
+ failingSince: string | null;
16
18
  eventTypes: WebhookEndpointListResponseDataItemEventTypesItem.Raw[];
17
19
  accountIds: string[];
18
20
  createdAt: string;
@@ -45,6 +45,8 @@ exports.WebhookEndpointListResponseDataItem = core.serialization.object({
45
45
  description: core.serialization.string().nullable(),
46
46
  secretPrefix: core.serialization.string(),
47
47
  enabled: core.serialization.boolean(),
48
+ autoDisabledAt: core.serialization.date().nullable(),
49
+ failingSince: core.serialization.date().nullable(),
48
50
  eventTypes: core.serialization.list(WebhookEndpointListResponseDataItemEventTypesItem_1.WebhookEndpointListResponseDataItemEventTypesItem),
49
51
  accountIds: core.serialization.list(core.serialization.string()),
50
52
  createdAt: core.serialization.date(),
@@ -13,6 +13,8 @@ export declare namespace WebhookEndpointUpdateResponse {
13
13
  description: string | null;
14
14
  secretPrefix: string;
15
15
  enabled: boolean;
16
+ autoDisabledAt: string | null;
17
+ failingSince: string | null;
16
18
  eventTypes: WebhookEndpointUpdateResponseEventTypesItem.Raw[];
17
19
  accountIds: string[];
18
20
  createdAt: string;
@@ -45,6 +45,8 @@ exports.WebhookEndpointUpdateResponse = core.serialization.object({
45
45
  description: core.serialization.string().nullable(),
46
46
  secretPrefix: core.serialization.string(),
47
47
  enabled: core.serialization.boolean(),
48
+ autoDisabledAt: core.serialization.date().nullable(),
49
+ failingSince: core.serialization.date().nullable(),
48
50
  eventTypes: core.serialization.list(WebhookEndpointUpdateResponseEventTypesItem_1.WebhookEndpointUpdateResponseEventTypesItem),
49
51
  accountIds: core.serialization.list(core.serialization.string()),
50
52
  createdAt: core.serialization.date(),