@unlimited-messaging/sdk 0.1.13 → 0.1.15
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/package.json +1 -1
- package/src/api/resources/messages/client/Client.d.ts +1 -1
- package/src/api/resources/messages/client/Client.js +1 -1
- package/src/api/resources/messages/types/MessageFindAllResponseDataItem.d.ts +7 -0
- package/src/api/resources/messages/types/MessageFindOneResponse.d.ts +7 -0
- package/src/api/resources/messages/types/MessageSendResponse.d.ts +7 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.js +3 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.js +3 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unlimited-messaging/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
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",
|
|
@@ -48,7 +48,7 @@ export declare class Messages {
|
|
|
48
48
|
/**
|
|
49
49
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:WRITE
|
|
50
50
|
*
|
|
51
|
-
* Queues a WhatsApp message for delivery to the specified `recipient
|
|
51
|
+
* Queues a WhatsApp message for delivery to the specified `recipient`: a phone number (E.164 format) for a 1:1 chat, or a WhatsApp group id (numeric, with or without its `@g.us` suffix) to address a group directly. If `accountId` is omitted, the platform resolves an account automatically using this priority order: (1) if the caller has exactly one active account, it is used; (2) if the caller has no account, the shared system account is used as fallback; (3) if the caller has multiple active accounts, a `400` is returned asking to specify `accountId`. Returns `404` if no account is available at all. Message text is limited to 1 600 characters. Provide `replyToMessageId` instead of `recipient` to send a quoted reply to a message already in the account's history: the conversation (a group included) and the account used are both derived from that message, and `accountId` is ignored. Beta (whatsmeow) WhatsApp accounts only for now. `simId` is a deprecated alias for `accountId`, removed 2026-12-16.
|
|
52
52
|
*
|
|
53
53
|
* @param {UnlimitedMessagingApi.MessageSendRequest} request
|
|
54
54
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -174,7 +174,7 @@ class Messages {
|
|
|
174
174
|
/**
|
|
175
175
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:WRITE
|
|
176
176
|
*
|
|
177
|
-
* Queues a WhatsApp message for delivery to the specified `recipient
|
|
177
|
+
* Queues a WhatsApp message for delivery to the specified `recipient`: a phone number (E.164 format) for a 1:1 chat, or a WhatsApp group id (numeric, with or without its `@g.us` suffix) to address a group directly. If `accountId` is omitted, the platform resolves an account automatically using this priority order: (1) if the caller has exactly one active account, it is used; (2) if the caller has no account, the shared system account is used as fallback; (3) if the caller has multiple active accounts, a `400` is returned asking to specify `accountId`. Returns `404` if no account is available at all. Message text is limited to 1 600 characters. Provide `replyToMessageId` instead of `recipient` to send a quoted reply to a message already in the account's history: the conversation (a group included) and the account used are both derived from that message, and `accountId` is ignored. Beta (whatsmeow) WhatsApp accounts only for now. `simId` is a deprecated alias for `accountId`, removed 2026-12-16.
|
|
178
178
|
*
|
|
179
179
|
* @param {UnlimitedMessagingApi.MessageSendRequest} request
|
|
180
180
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6,11 +6,18 @@ export interface MessageFindAllResponseDataItem {
|
|
|
6
6
|
id: string;
|
|
7
7
|
content: string;
|
|
8
8
|
direction: UnlimitedMessagingApi.MessageFindAllResponseDataItemDirection;
|
|
9
|
+
/** True when the account holder sent this message (direction OUT), false when they received it (direction IN). Redundant with direction, but spares the client from having to know which enum value means "we sent it" - the same convention as WhatsApp's own fromMe. */
|
|
10
|
+
fromMe: boolean;
|
|
9
11
|
externalId: string | null;
|
|
10
12
|
error: string | null;
|
|
13
|
+
/** Meaning depends on direction and isGroup. 1:1 chat: the other party's phone number, both directions. Group + direction IN: the participant who posted the message. Group + direction OUT: the group's own bare id, since an outbound message's author is always the account holder (never the account holder's own number). For who a reply specifically targets, see replyToParticipant instead. */
|
|
11
14
|
interlocutor: string;
|
|
12
15
|
conversationId: string | null;
|
|
13
16
|
isGroup: boolean;
|
|
17
|
+
/** The externalId of the message this one quotes as a reply, or null if it isn't a reply. */
|
|
18
|
+
replyToExternalId: string | null;
|
|
19
|
+
/** For a reply to a group message, the phone number of whoever posted the message being replied to - not necessarily the same as interlocutor. Null outside that case. */
|
|
20
|
+
replyToParticipant: string | null;
|
|
14
21
|
retryCount: number;
|
|
15
22
|
messagingAccountId: string;
|
|
16
23
|
status: UnlimitedMessagingApi.MessageFindAllResponseDataItemStatus;
|
|
@@ -6,11 +6,18 @@ export interface MessageFindOneResponse {
|
|
|
6
6
|
id: string;
|
|
7
7
|
content: string;
|
|
8
8
|
direction: UnlimitedMessagingApi.MessageFindOneResponseDirection;
|
|
9
|
+
/** True when the account holder sent this message (direction OUT), false when they received it (direction IN). Redundant with direction, but spares the client from having to know which enum value means "we sent it" - the same convention as WhatsApp's own fromMe. */
|
|
10
|
+
fromMe: boolean;
|
|
9
11
|
externalId: string | null;
|
|
10
12
|
error: string | null;
|
|
13
|
+
/** Meaning depends on direction and isGroup. 1:1 chat: the other party's phone number, both directions. Group + direction IN: the participant who posted the message. Group + direction OUT: the group's own bare id, since an outbound message's author is always the account holder (never the account holder's own number). For who a reply specifically targets, see replyToParticipant instead. */
|
|
11
14
|
interlocutor: string;
|
|
12
15
|
conversationId: string | null;
|
|
13
16
|
isGroup: boolean;
|
|
17
|
+
/** The externalId of the message this one quotes as a reply, or null if it isn't a reply. */
|
|
18
|
+
replyToExternalId: string | null;
|
|
19
|
+
/** For a reply to a group message, the phone number of whoever posted the message being replied to - not necessarily the same as interlocutor. Null outside that case. */
|
|
20
|
+
replyToParticipant: string | null;
|
|
14
21
|
retryCount: number;
|
|
15
22
|
messagingAccountId: string;
|
|
16
23
|
status: UnlimitedMessagingApi.MessageFindOneResponseStatus;
|
|
@@ -6,11 +6,18 @@ export interface MessageSendResponse {
|
|
|
6
6
|
id: string;
|
|
7
7
|
content: string;
|
|
8
8
|
direction: UnlimitedMessagingApi.MessageSendResponseDirection;
|
|
9
|
+
/** True when the account holder sent this message (direction OUT), false when they received it (direction IN). Redundant with direction, but spares the client from having to know which enum value means "we sent it" - the same convention as WhatsApp's own fromMe. */
|
|
10
|
+
fromMe: boolean;
|
|
9
11
|
externalId: string | null;
|
|
10
12
|
error: string | null;
|
|
13
|
+
/** Meaning depends on direction and isGroup. 1:1 chat: the other party's phone number, both directions. Group + direction IN: the participant who posted the message. Group + direction OUT: the group's own bare id, since an outbound message's author is always the account holder (never the account holder's own number). For who a reply specifically targets, see replyToParticipant instead. */
|
|
11
14
|
interlocutor: string;
|
|
12
15
|
conversationId: string | null;
|
|
13
16
|
isGroup: boolean;
|
|
17
|
+
/** The externalId of the message this one quotes as a reply, or null if it isn't a reply. */
|
|
18
|
+
replyToExternalId: string | null;
|
|
19
|
+
/** For a reply to a group message, the phone number of whoever posted the message being replied to - not necessarily the same as interlocutor. Null outside that case. */
|
|
20
|
+
replyToParticipant: string | null;
|
|
14
21
|
retryCount: number;
|
|
15
22
|
messagingAccountId: string;
|
|
16
23
|
status: UnlimitedMessagingApi.MessageSendResponseStatus;
|
|
@@ -14,11 +14,14 @@ export declare namespace MessageFindAllResponseDataItem {
|
|
|
14
14
|
id: string;
|
|
15
15
|
content: string;
|
|
16
16
|
direction: MessageFindAllResponseDataItemDirection.Raw;
|
|
17
|
+
fromMe: boolean;
|
|
17
18
|
externalId: string | null;
|
|
18
19
|
error: string | null;
|
|
19
20
|
interlocutor: string;
|
|
20
21
|
conversationId: string | null;
|
|
21
22
|
isGroup: boolean;
|
|
23
|
+
replyToExternalId: string | null;
|
|
24
|
+
replyToParticipant: string | null;
|
|
22
25
|
retryCount: number;
|
|
23
26
|
messagingAccountId: string;
|
|
24
27
|
status: MessageFindAllResponseDataItemStatus.Raw;
|
|
@@ -46,11 +46,14 @@ exports.MessageFindAllResponseDataItem = core.serialization.object({
|
|
|
46
46
|
id: core.serialization.string(),
|
|
47
47
|
content: core.serialization.string(),
|
|
48
48
|
direction: MessageFindAllResponseDataItemDirection_1.MessageFindAllResponseDataItemDirection,
|
|
49
|
+
fromMe: core.serialization.boolean(),
|
|
49
50
|
externalId: core.serialization.string().nullable(),
|
|
50
51
|
error: core.serialization.string().nullable(),
|
|
51
52
|
interlocutor: core.serialization.string(),
|
|
52
53
|
conversationId: core.serialization.string().nullable(),
|
|
53
54
|
isGroup: core.serialization.boolean(),
|
|
55
|
+
replyToExternalId: core.serialization.string().nullable(),
|
|
56
|
+
replyToParticipant: core.serialization.string().nullable(),
|
|
54
57
|
retryCount: core.serialization.number(),
|
|
55
58
|
messagingAccountId: core.serialization.string(),
|
|
56
59
|
status: MessageFindAllResponseDataItemStatus_1.MessageFindAllResponseDataItemStatus,
|
|
@@ -14,11 +14,14 @@ export declare namespace MessageFindOneResponse {
|
|
|
14
14
|
id: string;
|
|
15
15
|
content: string;
|
|
16
16
|
direction: MessageFindOneResponseDirection.Raw;
|
|
17
|
+
fromMe: boolean;
|
|
17
18
|
externalId: string | null;
|
|
18
19
|
error: string | null;
|
|
19
20
|
interlocutor: string;
|
|
20
21
|
conversationId: string | null;
|
|
21
22
|
isGroup: boolean;
|
|
23
|
+
replyToExternalId: string | null;
|
|
24
|
+
replyToParticipant: string | null;
|
|
22
25
|
retryCount: number;
|
|
23
26
|
messagingAccountId: string;
|
|
24
27
|
status: MessageFindOneResponseStatus.Raw;
|
|
@@ -46,11 +46,14 @@ exports.MessageFindOneResponse = core.serialization.object({
|
|
|
46
46
|
id: core.serialization.string(),
|
|
47
47
|
content: core.serialization.string(),
|
|
48
48
|
direction: MessageFindOneResponseDirection_1.MessageFindOneResponseDirection,
|
|
49
|
+
fromMe: core.serialization.boolean(),
|
|
49
50
|
externalId: core.serialization.string().nullable(),
|
|
50
51
|
error: core.serialization.string().nullable(),
|
|
51
52
|
interlocutor: core.serialization.string(),
|
|
52
53
|
conversationId: core.serialization.string().nullable(),
|
|
53
54
|
isGroup: core.serialization.boolean(),
|
|
55
|
+
replyToExternalId: core.serialization.string().nullable(),
|
|
56
|
+
replyToParticipant: core.serialization.string().nullable(),
|
|
54
57
|
retryCount: core.serialization.number(),
|
|
55
58
|
messagingAccountId: core.serialization.string(),
|
|
56
59
|
status: MessageFindOneResponseStatus_1.MessageFindOneResponseStatus,
|
|
@@ -14,11 +14,14 @@ export declare namespace MessageSendResponse {
|
|
|
14
14
|
id: string;
|
|
15
15
|
content: string;
|
|
16
16
|
direction: MessageSendResponseDirection.Raw;
|
|
17
|
+
fromMe: boolean;
|
|
17
18
|
externalId: string | null;
|
|
18
19
|
error: string | null;
|
|
19
20
|
interlocutor: string;
|
|
20
21
|
conversationId: string | null;
|
|
21
22
|
isGroup: boolean;
|
|
23
|
+
replyToExternalId: string | null;
|
|
24
|
+
replyToParticipant: string | null;
|
|
22
25
|
retryCount: number;
|
|
23
26
|
messagingAccountId: string;
|
|
24
27
|
status: MessageSendResponseStatus.Raw;
|
|
@@ -46,11 +46,14 @@ exports.MessageSendResponse = core.serialization.object({
|
|
|
46
46
|
id: core.serialization.string(),
|
|
47
47
|
content: core.serialization.string(),
|
|
48
48
|
direction: MessageSendResponseDirection_1.MessageSendResponseDirection,
|
|
49
|
+
fromMe: core.serialization.boolean(),
|
|
49
50
|
externalId: core.serialization.string().nullable(),
|
|
50
51
|
error: core.serialization.string().nullable(),
|
|
51
52
|
interlocutor: core.serialization.string(),
|
|
52
53
|
conversationId: core.serialization.string().nullable(),
|
|
53
54
|
isGroup: core.serialization.boolean(),
|
|
55
|
+
replyToExternalId: core.serialization.string().nullable(),
|
|
56
|
+
replyToParticipant: core.serialization.string().nullable(),
|
|
54
57
|
retryCount: core.serialization.number(),
|
|
55
58
|
messagingAccountId: core.serialization.string(),
|
|
56
59
|
status: MessageSendResponseStatus_1.MessageSendResponseStatus,
|