@unlimited-messaging/sdk 0.1.20 → 0.1.22
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/accounts/types/AccountGetAccountResponse.d.ts +3 -0
- package/src/api/resources/accounts/types/AccountGetAccountResponseOwner.d.ts +11 -0
- package/src/api/resources/accounts/types/AccountGetAccountResponseOwner.js +10 -0
- package/src/api/resources/accounts/types/AccountListAccountsResponseItem.d.ts +3 -0
- package/src/api/resources/accounts/types/AccountListAccountsResponseItemOwner.d.ts +11 -0
- package/src/api/resources/accounts/types/AccountListAccountsResponseItemOwner.js +10 -0
- package/src/api/resources/accounts/types/AccountUpdateAccountResponse.d.ts +3 -0
- package/src/api/resources/accounts/types/AccountUpdateAccountResponseOwner.d.ts +11 -0
- package/src/api/resources/accounts/types/AccountUpdateAccountResponseOwner.js +10 -0
- package/src/api/resources/accounts/types/index.d.ts +3 -0
- package/src/api/resources/accounts/types/index.js +3 -0
- package/src/api/resources/messages/client/Client.d.ts +13 -1
- package/src/api/resources/messages/client/Client.js +13 -1
- package/src/api/resources/messages/client/requests/MessageSendRequest.d.ts +10 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItem.d.ts +12 -1
- package/src/api/resources/messages/types/MessageFindAllResponseDataItemAttachmentsItem.d.ts +11 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItemAttachmentsItem.js +5 -0
- package/src/api/resources/messages/types/MessageFindOneResponse.d.ts +12 -1
- package/src/api/resources/messages/types/MessageFindOneResponseAttachmentsItem.d.ts +11 -0
- package/src/api/resources/messages/types/MessageFindOneResponseAttachmentsItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendRequestAttachmentsItem.d.ts +9 -0
- package/src/api/resources/messages/types/MessageSendRequestAttachmentsItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendRequestChannelsItem.d.ts +11 -0
- package/src/api/resources/messages/types/MessageSendRequestChannelsItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendRequestChannelsItemChannel.d.ts +8 -0
- package/src/api/resources/messages/types/MessageSendRequestChannelsItemChannel.js +10 -0
- package/src/api/resources/messages/types/MessageSendRequestMediaType.d.ts +3 -0
- package/src/api/resources/messages/types/MessageSendRequestTo.d.ts +7 -0
- package/src/api/resources/messages/types/MessageSendRequestTo.js +5 -0
- package/src/api/resources/messages/types/MessageSendResponse.d.ts +13 -1
- package/src/api/resources/messages/types/MessageSendResponseAttachmentsItem.d.ts +11 -0
- package/src/api/resources/messages/types/MessageSendResponseAttachmentsItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItem.d.ts +52 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemAccountChannel.d.ts +10 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemAccountChannel.js +12 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemAttachmentsItem.d.ts +11 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemAttachmentsItem.js +5 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemChannel.d.ts +9 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemChannel.js +11 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemDirection.d.ts +8 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemDirection.js +10 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemStatus.d.ts +13 -0
- package/src/api/resources/messages/types/MessageSendResponseMessagesItemStatus.js +15 -0
- package/src/api/resources/messages/types/index.d.ts +13 -0
- package/src/api/resources/messages/types/index.js +13 -0
- package/src/api/resources/webhooks/client/Client.d.ts +130 -11
- package/src/api/resources/webhooks/client/Client.js +130 -11
- package/src/api/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.js +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.js +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.js +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.js +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.js +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.d.ts +2 -1
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.js +1 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItem.d.ts +3 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemAttachmentsItem.d.ts +10 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemAttachmentsItem.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessage.d.ts +3 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageAttachmentsItem.d.ts +10 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageAttachmentsItem.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessage.d.ts +3 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageAttachmentsItem.d.ts +10 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageAttachmentsItem.js +5 -0
- package/src/api/types/WebhookEventMessageSent.d.ts +10 -0
- package/src/api/types/WebhookEventMessageSent.js +5 -0
- package/src/api/types/WebhookEventMessageSentData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageSentData.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSentDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSentDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSentDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSentDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageSentDataMessage.d.ts +29 -0
- package/src/api/types/WebhookEventMessageSentDataMessage.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataMessageAttachmentsItem.d.ts +10 -0
- package/src/api/types/WebhookEventMessageSentDataMessageAttachmentsItem.js +5 -0
- package/src/api/types/WebhookEventMessageSentDataMessageDirection.d.ts +8 -0
- package/src/api/types/WebhookEventMessageSentDataMessageDirection.js +10 -0
- package/src/api/types/WebhookEventMessageSentDataMessageReplyTo.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSentDataMessageReplyTo.js +5 -0
- package/src/api/types/WebhookEventMessageSentType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSentType.js +9 -0
- package/src/api/types/index.d.ts +14 -0
- package/src/api/types/index.js +14 -0
- package/src/serialization/resources/accounts/types/AccountGetAccountResponse.d.ts +2 -0
- package/src/serialization/resources/accounts/types/AccountGetAccountResponse.js +2 -0
- package/src/serialization/resources/accounts/types/AccountGetAccountResponseOwner.d.ts +10 -0
- package/src/serialization/resources/accounts/types/AccountGetAccountResponseOwner.js +41 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItem.d.ts +2 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItem.js +2 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItemOwner.d.ts +10 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItemOwner.js +41 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponse.d.ts +2 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponse.js +2 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponseOwner.d.ts +10 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponseOwner.js +41 -0
- package/src/serialization/resources/accounts/types/index.d.ts +3 -0
- package/src/serialization/resources/accounts/types/index.js +3 -0
- package/src/serialization/resources/messages/client/requests/MessageSendRequest.d.ts +8 -0
- package/src/serialization/resources/messages/client/requests/MessageSendRequest.js +8 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.d.ts +5 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.js +5 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItemAttachmentsItem.d.ts +16 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItemAttachmentsItem.js +47 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.d.ts +5 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.js +5 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponseAttachmentsItem.d.ts +16 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponseAttachmentsItem.js +47 -0
- package/src/serialization/resources/messages/types/MessageSendRequestAttachmentsItem.d.ts +15 -0
- package/src/serialization/resources/messages/types/MessageSendRequestAttachmentsItem.js +46 -0
- package/src/serialization/resources/messages/types/MessageSendRequestChannelsItem.d.ts +17 -0
- package/src/serialization/resources/messages/types/MessageSendRequestChannelsItem.js +48 -0
- package/src/serialization/resources/messages/types/MessageSendRequestChannelsItemChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendRequestChannelsItemChannel.js +41 -0
- package/src/serialization/resources/messages/types/MessageSendRequestTo.d.ts +13 -0
- package/src/serialization/resources/messages/types/MessageSendRequestTo.js +44 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.d.ts +7 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.js +7 -0
- package/src/serialization/resources/messages/types/MessageSendResponseAttachmentsItem.d.ts +16 -0
- package/src/serialization/resources/messages/types/MessageSendResponseAttachmentsItem.js +47 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItem.d.ts +47 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItem.js +78 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemAccountChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemAccountChannel.js +41 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemAttachmentsItem.d.ts +16 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemAttachmentsItem.js +47 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemChannel.js +41 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemDirection.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemDirection.js +41 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemStatus.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendResponseMessagesItemStatus.js +41 -0
- package/src/serialization/resources/messages/types/index.d.ts +13 -0
- package/src/serialization/resources/messages/types/index.js +13 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.js +1 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItem.d.ts +4 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItem.js +4 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemAttachmentsItem.d.ts +16 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemAttachmentsItem.js +47 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessage.d.ts +4 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessage.js +4 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageAttachmentsItem.d.ts +16 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageAttachmentsItem.js +47 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessage.d.ts +4 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessage.js +4 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageAttachmentsItem.d.ts +16 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageAttachmentsItem.js +47 -0
- package/src/serialization/types/WebhookEventMessageSent.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageSent.js +48 -0
- package/src/serialization/types/WebhookEventMessageSentData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageSentData.js +46 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSentDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessage.d.ts +37 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessage.js +68 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageAttachmentsItem.d.ts +16 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageAttachmentsItem.js +47 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageDirection.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageDirection.js +41 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageReplyTo.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageSentDataMessageReplyTo.js +44 -0
- package/src/serialization/types/WebhookEventMessageSentType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSentType.js +41 -0
- package/src/serialization/types/index.d.ts +14 -0
- package/src/serialization/types/index.js +14 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MessageSendResponseMessagesItemStatus = void 0;
|
|
7
|
+
exports.MessageSendResponseMessagesItemStatus = {
|
|
8
|
+
Pending: "PENDING",
|
|
9
|
+
Sending: "SENDING",
|
|
10
|
+
Sent: "SENT",
|
|
11
|
+
Delivered: "DELIVERED",
|
|
12
|
+
Read: "READ",
|
|
13
|
+
Failed: "FAILED",
|
|
14
|
+
Undeliverable: "UNDELIVERABLE",
|
|
15
|
+
};
|
|
@@ -5,8 +5,13 @@ export * from "./MessageFindAllResponseDataItemDirection";
|
|
|
5
5
|
export * from "./MessageFindAllResponseDataItemStatus";
|
|
6
6
|
export * from "./MessageFindAllResponseDataItemChannel";
|
|
7
7
|
export * from "./MessageFindAllResponseDataItemAccountChannel";
|
|
8
|
+
export * from "./MessageFindAllResponseDataItemAttachmentsItem";
|
|
8
9
|
export * from "./MessageFindAllResponseDataItem";
|
|
9
10
|
export * from "./MessageFindAllResponse";
|
|
11
|
+
export * from "./MessageSendRequestAttachmentsItem";
|
|
12
|
+
export * from "./MessageSendRequestTo";
|
|
13
|
+
export * from "./MessageSendRequestChannelsItemChannel";
|
|
14
|
+
export * from "./MessageSendRequestChannelsItem";
|
|
10
15
|
export * from "./MessageSendRequestMediaType";
|
|
11
16
|
export * from "./MessageSendRequestPriority";
|
|
12
17
|
export * from "./MessageSendRequestProductData";
|
|
@@ -14,11 +19,19 @@ export * from "./MessageSendResponseDirection";
|
|
|
14
19
|
export * from "./MessageSendResponseStatus";
|
|
15
20
|
export * from "./MessageSendResponseChannel";
|
|
16
21
|
export * from "./MessageSendResponseAccountChannel";
|
|
22
|
+
export * from "./MessageSendResponseAttachmentsItem";
|
|
23
|
+
export * from "./MessageSendResponseMessagesItemDirection";
|
|
24
|
+
export * from "./MessageSendResponseMessagesItemStatus";
|
|
25
|
+
export * from "./MessageSendResponseMessagesItemChannel";
|
|
26
|
+
export * from "./MessageSendResponseMessagesItemAccountChannel";
|
|
27
|
+
export * from "./MessageSendResponseMessagesItemAttachmentsItem";
|
|
28
|
+
export * from "./MessageSendResponseMessagesItem";
|
|
17
29
|
export * from "./MessageSendResponse";
|
|
18
30
|
export * from "./MessageFindOneResponseDirection";
|
|
19
31
|
export * from "./MessageFindOneResponseStatus";
|
|
20
32
|
export * from "./MessageFindOneResponseChannel";
|
|
21
33
|
export * from "./MessageFindOneResponseAccountChannel";
|
|
34
|
+
export * from "./MessageFindOneResponseAttachmentsItem";
|
|
22
35
|
export * from "./MessageFindOneResponse";
|
|
23
36
|
export * from "./MessageGetStatusHistoryResponseChannelsItemChannel";
|
|
24
37
|
export * from "./MessageGetStatusHistoryResponseChannelsItemEventsItemStatus";
|
|
@@ -21,8 +21,13 @@ __exportStar(require("./MessageFindAllResponseDataItemDirection"), exports);
|
|
|
21
21
|
__exportStar(require("./MessageFindAllResponseDataItemStatus"), exports);
|
|
22
22
|
__exportStar(require("./MessageFindAllResponseDataItemChannel"), exports);
|
|
23
23
|
__exportStar(require("./MessageFindAllResponseDataItemAccountChannel"), exports);
|
|
24
|
+
__exportStar(require("./MessageFindAllResponseDataItemAttachmentsItem"), exports);
|
|
24
25
|
__exportStar(require("./MessageFindAllResponseDataItem"), exports);
|
|
25
26
|
__exportStar(require("./MessageFindAllResponse"), exports);
|
|
27
|
+
__exportStar(require("./MessageSendRequestAttachmentsItem"), exports);
|
|
28
|
+
__exportStar(require("./MessageSendRequestTo"), exports);
|
|
29
|
+
__exportStar(require("./MessageSendRequestChannelsItemChannel"), exports);
|
|
30
|
+
__exportStar(require("./MessageSendRequestChannelsItem"), exports);
|
|
26
31
|
__exportStar(require("./MessageSendRequestMediaType"), exports);
|
|
27
32
|
__exportStar(require("./MessageSendRequestPriority"), exports);
|
|
28
33
|
__exportStar(require("./MessageSendRequestProductData"), exports);
|
|
@@ -30,11 +35,19 @@ __exportStar(require("./MessageSendResponseDirection"), exports);
|
|
|
30
35
|
__exportStar(require("./MessageSendResponseStatus"), exports);
|
|
31
36
|
__exportStar(require("./MessageSendResponseChannel"), exports);
|
|
32
37
|
__exportStar(require("./MessageSendResponseAccountChannel"), exports);
|
|
38
|
+
__exportStar(require("./MessageSendResponseAttachmentsItem"), exports);
|
|
39
|
+
__exportStar(require("./MessageSendResponseMessagesItemDirection"), exports);
|
|
40
|
+
__exportStar(require("./MessageSendResponseMessagesItemStatus"), exports);
|
|
41
|
+
__exportStar(require("./MessageSendResponseMessagesItemChannel"), exports);
|
|
42
|
+
__exportStar(require("./MessageSendResponseMessagesItemAccountChannel"), exports);
|
|
43
|
+
__exportStar(require("./MessageSendResponseMessagesItemAttachmentsItem"), exports);
|
|
44
|
+
__exportStar(require("./MessageSendResponseMessagesItem"), exports);
|
|
33
45
|
__exportStar(require("./MessageSendResponse"), exports);
|
|
34
46
|
__exportStar(require("./MessageFindOneResponseDirection"), exports);
|
|
35
47
|
__exportStar(require("./MessageFindOneResponseStatus"), exports);
|
|
36
48
|
__exportStar(require("./MessageFindOneResponseChannel"), exports);
|
|
37
49
|
__exportStar(require("./MessageFindOneResponseAccountChannel"), exports);
|
|
50
|
+
__exportStar(require("./MessageFindOneResponseAttachmentsItem"), exports);
|
|
38
51
|
__exportStar(require("./MessageFindOneResponse"), exports);
|
|
39
52
|
__exportStar(require("./MessageGetStatusHistoryResponseChannelsItemChannel"), exports);
|
|
40
53
|
__exportStar(require("./MessageGetStatusHistoryResponseChannelsItemEventsItemStatus"), exports);
|
|
@@ -66,8 +66,12 @@ export declare namespace Webhooks {
|
|
|
66
66
|
*
|
|
67
67
|
* ### Ordering and duplicates
|
|
68
68
|
*
|
|
69
|
-
* Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (
|
|
70
|
-
*
|
|
69
|
+
* Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (equal to
|
|
70
|
+
* the `webhook-id` header and kept across retries). `eventId` is per endpoint: two endpoints
|
|
71
|
+
* receiving the same event get two ids, so deduplicate across endpoints on the message's `id` or
|
|
72
|
+
* `externalId` instead. A message is also never announced twice: `message.externalId` is unique per
|
|
73
|
+
* account, and each message is announced by one of `message.received`, `message.self_sent` or
|
|
74
|
+
* `message.sent`, never by two.
|
|
71
75
|
*
|
|
72
76
|
* **Events are not delivered in the order things happened.** Retries reorder them, and a message with
|
|
73
77
|
* media is only announced once its media is stored, a few seconds after it arrived: a text sent right
|
|
@@ -76,12 +80,13 @@ export declare namespace Webhooks {
|
|
|
76
80
|
*
|
|
77
81
|
* | Event | Order on |
|
|
78
82
|
* | ----- | -------- |
|
|
79
|
-
* | `message.received`, `message.self_sent` | `data.message.sentAt` (WhatsApp's timestamp) |
|
|
83
|
+
* | `message.received`, `message.self_sent`, `message.sent` | `data.message.sentAt` (WhatsApp's timestamp) |
|
|
80
84
|
* | `message.status` | `data.message.at`, and `previousStatus` to ignore a stale one |
|
|
81
85
|
* | `message.reaction` | `data.reaction.sentAt` |
|
|
82
86
|
* | `message.edited` | `data.edit.editedAt` |
|
|
83
87
|
* | `message.deleted` | `data.deletion.deletedAt` |
|
|
84
88
|
* | `account.status_changed` | `data.account.at` |
|
|
89
|
+
* | `group.updated` | `data.at` |
|
|
85
90
|
*
|
|
86
91
|
* `GET /message` returns the same `sentAt`.
|
|
87
92
|
*
|
|
@@ -97,14 +102,128 @@ export declare namespace Webhooks {
|
|
|
97
102
|
* | Type | When |
|
|
98
103
|
* | ---- | ---- |
|
|
99
104
|
* | `message.received` | A message arrived. |
|
|
100
|
-
* | `message.self_sent` | The account's own phone sent a message by hand, outside the API.
|
|
101
|
-
* | `message.
|
|
102
|
-
* | `message.
|
|
103
|
-
* | `message.
|
|
104
|
-
* | `message.
|
|
105
|
-
* | `message.
|
|
106
|
-
* | `
|
|
107
|
-
* | `
|
|
105
|
+
* | `message.self_sent` | The account's own phone sent a message by hand, outside the API. |
|
|
106
|
+
* | `message.sent` | A message you sent through the API reached the channel. Carries its content. |
|
|
107
|
+
* | `message.status` | A message you sent changed status: `SENT`, `DELIVERED`, `READ`, `FAILED` or `UNDELIVERABLE`. |
|
|
108
|
+
* | `message.reaction` | Someone reacted to a message, or took their reaction back. |
|
|
109
|
+
* | `message.edited` | A message was edited. |
|
|
110
|
+
* | `message.deleted` | A message was deleted for everyone. |
|
|
111
|
+
* | `message.history` | Past messages, in batches, for an account linked with `syncHistory`. |
|
|
112
|
+
* | `group.updated` | A group the account is in changed. |
|
|
113
|
+
* | `account.status_changed` | An account's status changed. |
|
|
114
|
+
*
|
|
115
|
+
* An endpoint receives only the types listed in its `eventTypes`: there is no "every event" option,
|
|
116
|
+
* and a type added later is never turned on for existing endpoints. To start receiving one, send the
|
|
117
|
+
* full list you want with `PATCH /webhooks/{id}` (`eventTypes` replaces the previous list).
|
|
118
|
+
*
|
|
119
|
+
* The four `message.received`, `message.self_sent`, `message.sent` and `message.history` events carry
|
|
120
|
+
* the same message object (`data.message`, or each item of `data.messages`): `id` (UnlimitedMessaging),
|
|
121
|
+
* `externalId` (WhatsApp), `direction` (`IN` or `OUT`), `fromMe`, `content`, `sentAt` (the channel's
|
|
122
|
+
* timestamp), `receivedAt` (when UnlimitedMessaging recorded it), `sender`, `senderId`, `senderName`,
|
|
123
|
+
* `participant`, `replyTo`, `transcript`, the media fields described below, and for email `subject`,
|
|
124
|
+
* `html` and `attachments`. Message events also carry `data.channel`: `type` (`WHATSAPP`, `EMAIL`),
|
|
125
|
+
* `account` (`id`, `name`) and `conversation` (`id`, `isGroup`, `address`, and `participants` for a
|
|
126
|
+
* group).
|
|
127
|
+
*
|
|
128
|
+
* #### message.received
|
|
129
|
+
*
|
|
130
|
+
* A message arrived on one of your accounts, in a 1:1 conversation or a group. Fired once per message:
|
|
131
|
+
* a message WhatsApp delivers twice, or that a history sync brings again, is not announced again. A
|
|
132
|
+
* message with media is announced once its media is stored, so it carries `mediaUrl` (or
|
|
133
|
+
* `mediaError`). `direction` is `IN`, `fromMe` is `false`. Not fired for the account's own messages:
|
|
134
|
+
* those are `message.self_sent` or `message.sent`.
|
|
135
|
+
*
|
|
136
|
+
* #### message.self_sent
|
|
137
|
+
*
|
|
138
|
+
* The account's own phone, or another device linked to it, sent a message by hand, outside the API.
|
|
139
|
+
* Same shape as `message.received`, with `direction: "OUT"`, `fromMe: true`, and `sender` the
|
|
140
|
+
* account's own number. Fired once per message. Never fired for a message sent through the API, even
|
|
141
|
+
* though WhatsApp echoes those back too: that is `message.sent`.
|
|
142
|
+
*
|
|
143
|
+
* #### message.sent
|
|
144
|
+
*
|
|
145
|
+
* A message you sent through the API (`POST /message`, a reply) reached the channel. Same shape as
|
|
146
|
+
* `message.self_sent`: `direction: "OUT"`, `fromMe: true`, with the `content`, `externalId`, `sentAt`,
|
|
147
|
+
* the conversation it went to (`conversation.id`, `isGroup`, `address`, and `participants` for a group
|
|
148
|
+
* when they could be read) and, for a media message, `mediaUrl`, `mediaType`, `mimeType` and
|
|
149
|
+
* `mediaFilename`. `id` is the one `POST /message` returned.
|
|
150
|
+
*
|
|
151
|
+
* It fires exactly once per message, when the message first reaches the channel: on its move from
|
|
152
|
+
* `PENDING` or `SENDING` to `SENT`, or straight to `DELIVERED` or `READ` when the channel skips `SENT`.
|
|
153
|
+
* By then its `externalId` is known. Later receipts (`DELIVERED`, `READ`) never fire it again, nor does
|
|
154
|
+
* a retry or a duplicate receipt. A message that never goes out (`FAILED`, `UNDELIVERABLE`) never fires
|
|
155
|
+
* it: watch `message.status` for those. Not fired for a message typed on the phone
|
|
156
|
+
* (`message.self_sent`) or for a received message. A message that had already reached the channel
|
|
157
|
+
* before this event existed is not announced.
|
|
158
|
+
*
|
|
159
|
+
* `message.sent` and the `message.status` reporting `SENT` come from the same change and are delivered
|
|
160
|
+
* independently: either can arrive first.
|
|
161
|
+
*
|
|
162
|
+
* #### message.status
|
|
163
|
+
*
|
|
164
|
+
* A message you sent changed status. `data.message` holds `id`, `externalId`, `status`,
|
|
165
|
+
* `previousStatus`, `error` (why a `FAILED` or `UNDELIVERABLE` message did not go through), `at` (when
|
|
166
|
+
* the status changed) and `sentAt`. No content: that is `message.sent`. Fired once per effective
|
|
167
|
+
* change to `SENT`, `DELIVERED`, `READ`, `FAILED` or `UNDELIVERABLE`; `PENDING` and `SENDING` are
|
|
168
|
+
* UnlimitedMessaging's own queueing steps and are not reported. A receipt arriving out of order (a
|
|
169
|
+
* `DELIVERED` after a `READ`) changes nothing and fires nothing. A failed message that is retried goes
|
|
170
|
+
* through `SENT` again from `SENDING`. Receipts WhatsApp reports for a message typed on the phone
|
|
171
|
+
* (stored as `SENT`) fire it too.
|
|
172
|
+
*
|
|
173
|
+
* #### message.reaction
|
|
174
|
+
*
|
|
175
|
+
* Someone reacted to a message, or took their reaction back (`removed: true`, empty `emoji`). The
|
|
176
|
+
* account's own reactions are included, with `fromMe: true`. `data.reaction` holds `emoji`, `removed`,
|
|
177
|
+
* `reactedToExternalId`, `reactedToMessageId` (null when that message is not stored, see below),
|
|
178
|
+
* `sender`, `senderId`, `senderName`, `participant` (in a group), `fromMe` and `sentAt`. Nothing is
|
|
179
|
+
* stored: a reaction is not a message.
|
|
180
|
+
*
|
|
181
|
+
* #### message.edited
|
|
182
|
+
*
|
|
183
|
+
* A message was edited, by its author. `data.edit` holds `externalId`, `messageId`, `newContent`,
|
|
184
|
+
* `kind` (`text`, or `caption` for the caption of an image, video or document), `error`, `editedAt`,
|
|
185
|
+
* `sender`, `senderId`, `participant` and `fromMe`. The stored content is updated. Phones encrypt an
|
|
186
|
+
* edit with the original message's key: when it cannot be opened (`error`: `original_secret_missing`
|
|
187
|
+
* for a message the account received before it was linked, `decryption_failed` otherwise), the edit is
|
|
188
|
+
* still announced, with `newContent` and `kind` null, and the stored content is left as it was.
|
|
189
|
+
*
|
|
190
|
+
* #### message.deleted
|
|
191
|
+
*
|
|
192
|
+
* A message was deleted for everyone, by its author or a group admin. `data.deletion` holds
|
|
193
|
+
* `externalId`, `messageId`, `deletedAt`, `deletedBy`, `deletedById`, `participant` and `fromMe`. The
|
|
194
|
+
* stored message is kept, with `deletedAt` set.
|
|
195
|
+
*
|
|
196
|
+
* #### message.history
|
|
197
|
+
*
|
|
198
|
+
* Past messages, in batches of up to 100, for an account linked with `syncHistory` (see History
|
|
199
|
+
* below), or asked for with `POST /account/{accountId}/history`. `data` holds `syncType`,
|
|
200
|
+
* `chunkOrder`, `progress`, `isLatest`, `channel` (`type`, `account`) and `messages`, each shaped like
|
|
201
|
+
* the message of `message.received` plus its own `conversation`. Only messages stored for the first
|
|
202
|
+
* time are included. Never sent to an endpoint that did not subscribe to it, and never fired for an
|
|
203
|
+
* account that did not ask for its history.
|
|
204
|
+
*
|
|
205
|
+
* #### group.updated
|
|
206
|
+
*
|
|
207
|
+
* A group the account is in changed (beta accounts). `data` holds `group.id`, `by` (who made the
|
|
208
|
+
* change, when the channel says), `at`, `name`, `topic`, and the members `added`, `removed`,
|
|
209
|
+
* `promoted` and `demoted` (+E164, or an id when the number is hidden). A field that did not change is
|
|
210
|
+
* null or empty.
|
|
211
|
+
*
|
|
212
|
+
* #### account.status_changed
|
|
213
|
+
*
|
|
214
|
+
* An account's status changed: connected, disconnected, logged out, restricted by WhatsApp
|
|
215
|
+
* (`BLOCKED`, with `blockedUntil`), reconnected, deleted... `data.account` holds `id`, `name`,
|
|
216
|
+
* `status`, `previousStatus`, `reason`, `transportCode`, `blockedUntil` and `at`. Fired on every
|
|
217
|
+
* effective change only: a status reported again unchanged fires nothing. `reason` is a
|
|
218
|
+
* machine-readable code (`connected`, `disconnected`, `device_removed` when the device was removed
|
|
219
|
+
* from the phone, `logged_out` when WhatsApp refused the session, `temporary_ban`, `restricted`,
|
|
220
|
+
* `restriction_lifted`, `deleted`, `linking_started`...); treat an unknown value as "changed for another
|
|
221
|
+
* reason", the list grows. `transportCode` is WhatsApp's own numeric code, for diagnosis.
|
|
222
|
+
*
|
|
223
|
+
* #### message.transcribed
|
|
224
|
+
*
|
|
225
|
+
* Reserved for the text extracted from media (OCR, PDF text, voice transcription). It is not fired yet
|
|
226
|
+
* and cannot be subscribed to; `transcript` is `null` on messages until it is.
|
|
108
227
|
*
|
|
109
228
|
* The schema of each payload is published with this reference, under `WebhookEvent*`.
|
|
110
229
|
*
|
|
@@ -99,8 +99,12 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
99
99
|
*
|
|
100
100
|
* ### Ordering and duplicates
|
|
101
101
|
*
|
|
102
|
-
* Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (
|
|
103
|
-
*
|
|
102
|
+
* Delivery is at least once: the same event can arrive twice, so deduplicate on `eventId` (equal to
|
|
103
|
+
* the `webhook-id` header and kept across retries). `eventId` is per endpoint: two endpoints
|
|
104
|
+
* receiving the same event get two ids, so deduplicate across endpoints on the message's `id` or
|
|
105
|
+
* `externalId` instead. A message is also never announced twice: `message.externalId` is unique per
|
|
106
|
+
* account, and each message is announced by one of `message.received`, `message.self_sent` or
|
|
107
|
+
* `message.sent`, never by two.
|
|
104
108
|
*
|
|
105
109
|
* **Events are not delivered in the order things happened.** Retries reorder them, and a message with
|
|
106
110
|
* media is only announced once its media is stored, a few seconds after it arrived: a text sent right
|
|
@@ -109,12 +113,13 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
109
113
|
*
|
|
110
114
|
* | Event | Order on |
|
|
111
115
|
* | ----- | -------- |
|
|
112
|
-
* | `message.received`, `message.self_sent` | `data.message.sentAt` (WhatsApp's timestamp) |
|
|
116
|
+
* | `message.received`, `message.self_sent`, `message.sent` | `data.message.sentAt` (WhatsApp's timestamp) |
|
|
113
117
|
* | `message.status` | `data.message.at`, and `previousStatus` to ignore a stale one |
|
|
114
118
|
* | `message.reaction` | `data.reaction.sentAt` |
|
|
115
119
|
* | `message.edited` | `data.edit.editedAt` |
|
|
116
120
|
* | `message.deleted` | `data.deletion.deletedAt` |
|
|
117
121
|
* | `account.status_changed` | `data.account.at` |
|
|
122
|
+
* | `group.updated` | `data.at` |
|
|
118
123
|
*
|
|
119
124
|
* `GET /message` returns the same `sentAt`.
|
|
120
125
|
*
|
|
@@ -130,14 +135,128 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
130
135
|
* | Type | When |
|
|
131
136
|
* | ---- | ---- |
|
|
132
137
|
* | `message.received` | A message arrived. |
|
|
133
|
-
* | `message.self_sent` | The account's own phone sent a message by hand, outside the API.
|
|
134
|
-
* | `message.
|
|
135
|
-
* | `message.
|
|
136
|
-
* | `message.
|
|
137
|
-
* | `message.
|
|
138
|
-
* | `message.
|
|
139
|
-
* | `
|
|
140
|
-
* | `
|
|
138
|
+
* | `message.self_sent` | The account's own phone sent a message by hand, outside the API. |
|
|
139
|
+
* | `message.sent` | A message you sent through the API reached the channel. Carries its content. |
|
|
140
|
+
* | `message.status` | A message you sent changed status: `SENT`, `DELIVERED`, `READ`, `FAILED` or `UNDELIVERABLE`. |
|
|
141
|
+
* | `message.reaction` | Someone reacted to a message, or took their reaction back. |
|
|
142
|
+
* | `message.edited` | A message was edited. |
|
|
143
|
+
* | `message.deleted` | A message was deleted for everyone. |
|
|
144
|
+
* | `message.history` | Past messages, in batches, for an account linked with `syncHistory`. |
|
|
145
|
+
* | `group.updated` | A group the account is in changed. |
|
|
146
|
+
* | `account.status_changed` | An account's status changed. |
|
|
147
|
+
*
|
|
148
|
+
* An endpoint receives only the types listed in its `eventTypes`: there is no "every event" option,
|
|
149
|
+
* and a type added later is never turned on for existing endpoints. To start receiving one, send the
|
|
150
|
+
* full list you want with `PATCH /webhooks/{id}` (`eventTypes` replaces the previous list).
|
|
151
|
+
*
|
|
152
|
+
* The four `message.received`, `message.self_sent`, `message.sent` and `message.history` events carry
|
|
153
|
+
* the same message object (`data.message`, or each item of `data.messages`): `id` (UnlimitedMessaging),
|
|
154
|
+
* `externalId` (WhatsApp), `direction` (`IN` or `OUT`), `fromMe`, `content`, `sentAt` (the channel's
|
|
155
|
+
* timestamp), `receivedAt` (when UnlimitedMessaging recorded it), `sender`, `senderId`, `senderName`,
|
|
156
|
+
* `participant`, `replyTo`, `transcript`, the media fields described below, and for email `subject`,
|
|
157
|
+
* `html` and `attachments`. Message events also carry `data.channel`: `type` (`WHATSAPP`, `EMAIL`),
|
|
158
|
+
* `account` (`id`, `name`) and `conversation` (`id`, `isGroup`, `address`, and `participants` for a
|
|
159
|
+
* group).
|
|
160
|
+
*
|
|
161
|
+
* #### message.received
|
|
162
|
+
*
|
|
163
|
+
* A message arrived on one of your accounts, in a 1:1 conversation or a group. Fired once per message:
|
|
164
|
+
* a message WhatsApp delivers twice, or that a history sync brings again, is not announced again. A
|
|
165
|
+
* message with media is announced once its media is stored, so it carries `mediaUrl` (or
|
|
166
|
+
* `mediaError`). `direction` is `IN`, `fromMe` is `false`. Not fired for the account's own messages:
|
|
167
|
+
* those are `message.self_sent` or `message.sent`.
|
|
168
|
+
*
|
|
169
|
+
* #### message.self_sent
|
|
170
|
+
*
|
|
171
|
+
* The account's own phone, or another device linked to it, sent a message by hand, outside the API.
|
|
172
|
+
* Same shape as `message.received`, with `direction: "OUT"`, `fromMe: true`, and `sender` the
|
|
173
|
+
* account's own number. Fired once per message. Never fired for a message sent through the API, even
|
|
174
|
+
* though WhatsApp echoes those back too: that is `message.sent`.
|
|
175
|
+
*
|
|
176
|
+
* #### message.sent
|
|
177
|
+
*
|
|
178
|
+
* A message you sent through the API (`POST /message`, a reply) reached the channel. Same shape as
|
|
179
|
+
* `message.self_sent`: `direction: "OUT"`, `fromMe: true`, with the `content`, `externalId`, `sentAt`,
|
|
180
|
+
* the conversation it went to (`conversation.id`, `isGroup`, `address`, and `participants` for a group
|
|
181
|
+
* when they could be read) and, for a media message, `mediaUrl`, `mediaType`, `mimeType` and
|
|
182
|
+
* `mediaFilename`. `id` is the one `POST /message` returned.
|
|
183
|
+
*
|
|
184
|
+
* It fires exactly once per message, when the message first reaches the channel: on its move from
|
|
185
|
+
* `PENDING` or `SENDING` to `SENT`, or straight to `DELIVERED` or `READ` when the channel skips `SENT`.
|
|
186
|
+
* By then its `externalId` is known. Later receipts (`DELIVERED`, `READ`) never fire it again, nor does
|
|
187
|
+
* a retry or a duplicate receipt. A message that never goes out (`FAILED`, `UNDELIVERABLE`) never fires
|
|
188
|
+
* it: watch `message.status` for those. Not fired for a message typed on the phone
|
|
189
|
+
* (`message.self_sent`) or for a received message. A message that had already reached the channel
|
|
190
|
+
* before this event existed is not announced.
|
|
191
|
+
*
|
|
192
|
+
* `message.sent` and the `message.status` reporting `SENT` come from the same change and are delivered
|
|
193
|
+
* independently: either can arrive first.
|
|
194
|
+
*
|
|
195
|
+
* #### message.status
|
|
196
|
+
*
|
|
197
|
+
* A message you sent changed status. `data.message` holds `id`, `externalId`, `status`,
|
|
198
|
+
* `previousStatus`, `error` (why a `FAILED` or `UNDELIVERABLE` message did not go through), `at` (when
|
|
199
|
+
* the status changed) and `sentAt`. No content: that is `message.sent`. Fired once per effective
|
|
200
|
+
* change to `SENT`, `DELIVERED`, `READ`, `FAILED` or `UNDELIVERABLE`; `PENDING` and `SENDING` are
|
|
201
|
+
* UnlimitedMessaging's own queueing steps and are not reported. A receipt arriving out of order (a
|
|
202
|
+
* `DELIVERED` after a `READ`) changes nothing and fires nothing. A failed message that is retried goes
|
|
203
|
+
* through `SENT` again from `SENDING`. Receipts WhatsApp reports for a message typed on the phone
|
|
204
|
+
* (stored as `SENT`) fire it too.
|
|
205
|
+
*
|
|
206
|
+
* #### message.reaction
|
|
207
|
+
*
|
|
208
|
+
* Someone reacted to a message, or took their reaction back (`removed: true`, empty `emoji`). The
|
|
209
|
+
* account's own reactions are included, with `fromMe: true`. `data.reaction` holds `emoji`, `removed`,
|
|
210
|
+
* `reactedToExternalId`, `reactedToMessageId` (null when that message is not stored, see below),
|
|
211
|
+
* `sender`, `senderId`, `senderName`, `participant` (in a group), `fromMe` and `sentAt`. Nothing is
|
|
212
|
+
* stored: a reaction is not a message.
|
|
213
|
+
*
|
|
214
|
+
* #### message.edited
|
|
215
|
+
*
|
|
216
|
+
* A message was edited, by its author. `data.edit` holds `externalId`, `messageId`, `newContent`,
|
|
217
|
+
* `kind` (`text`, or `caption` for the caption of an image, video or document), `error`, `editedAt`,
|
|
218
|
+
* `sender`, `senderId`, `participant` and `fromMe`. The stored content is updated. Phones encrypt an
|
|
219
|
+
* edit with the original message's key: when it cannot be opened (`error`: `original_secret_missing`
|
|
220
|
+
* for a message the account received before it was linked, `decryption_failed` otherwise), the edit is
|
|
221
|
+
* still announced, with `newContent` and `kind` null, and the stored content is left as it was.
|
|
222
|
+
*
|
|
223
|
+
* #### message.deleted
|
|
224
|
+
*
|
|
225
|
+
* A message was deleted for everyone, by its author or a group admin. `data.deletion` holds
|
|
226
|
+
* `externalId`, `messageId`, `deletedAt`, `deletedBy`, `deletedById`, `participant` and `fromMe`. The
|
|
227
|
+
* stored message is kept, with `deletedAt` set.
|
|
228
|
+
*
|
|
229
|
+
* #### message.history
|
|
230
|
+
*
|
|
231
|
+
* Past messages, in batches of up to 100, for an account linked with `syncHistory` (see History
|
|
232
|
+
* below), or asked for with `POST /account/{accountId}/history`. `data` holds `syncType`,
|
|
233
|
+
* `chunkOrder`, `progress`, `isLatest`, `channel` (`type`, `account`) and `messages`, each shaped like
|
|
234
|
+
* the message of `message.received` plus its own `conversation`. Only messages stored for the first
|
|
235
|
+
* time are included. Never sent to an endpoint that did not subscribe to it, and never fired for an
|
|
236
|
+
* account that did not ask for its history.
|
|
237
|
+
*
|
|
238
|
+
* #### group.updated
|
|
239
|
+
*
|
|
240
|
+
* A group the account is in changed (beta accounts). `data` holds `group.id`, `by` (who made the
|
|
241
|
+
* change, when the channel says), `at`, `name`, `topic`, and the members `added`, `removed`,
|
|
242
|
+
* `promoted` and `demoted` (+E164, or an id when the number is hidden). A field that did not change is
|
|
243
|
+
* null or empty.
|
|
244
|
+
*
|
|
245
|
+
* #### account.status_changed
|
|
246
|
+
*
|
|
247
|
+
* An account's status changed: connected, disconnected, logged out, restricted by WhatsApp
|
|
248
|
+
* (`BLOCKED`, with `blockedUntil`), reconnected, deleted... `data.account` holds `id`, `name`,
|
|
249
|
+
* `status`, `previousStatus`, `reason`, `transportCode`, `blockedUntil` and `at`. Fired on every
|
|
250
|
+
* effective change only: a status reported again unchanged fires nothing. `reason` is a
|
|
251
|
+
* machine-readable code (`connected`, `disconnected`, `device_removed` when the device was removed
|
|
252
|
+
* from the phone, `logged_out` when WhatsApp refused the session, `temporary_ban`, `restricted`,
|
|
253
|
+
* `restriction_lifted`, `deleted`, `linking_started`...); treat an unknown value as "changed for another
|
|
254
|
+
* reason", the list grows. `transportCode` is WhatsApp's own numeric code, for diagnosis.
|
|
255
|
+
*
|
|
256
|
+
* #### message.transcribed
|
|
257
|
+
*
|
|
258
|
+
* Reserved for the text extracted from media (OCR, PDF text, voice transcription). It is not fired yet
|
|
259
|
+
* and cannot be subscribed to; `transcript` is `null` on messages until it is.
|
|
141
260
|
*
|
|
142
261
|
* The schema of each payload is published with this reference, under `WebhookEvent*`.
|
|
143
262
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointCreateRequestEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointCreateRequestEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointCreateRequestEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointCreateRequestEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointCreateResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointCreateResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointCreateResponseEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointCreateResponseEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointFindOneResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointFindOneResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointFindOneResponseEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointFindOneResponseEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointListResponseDataItemEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointListResponseDataItemEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointListResponseDataItemEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointListResponseDataItemEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointUpdateRequestEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointUpdateRequestEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointUpdateRequestEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointUpdateRequestEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type WebhookEndpointUpdateResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted";
|
|
4
|
+
export type WebhookEndpointUpdateResponseEventTypesItem = "message.received" | "message.self_sent" | "message.status" | "message.reaction" | "message.edited" | "account.status_changed" | "message.history" | "group.updated" | "message.deleted" | "message.sent";
|
|
5
5
|
export declare const WebhookEndpointUpdateResponseEventTypesItem: {
|
|
6
6
|
readonly MessageReceived: "message.received";
|
|
7
7
|
readonly MessageSelfSent: "message.self_sent";
|
|
@@ -12,4 +12,5 @@ export declare const WebhookEndpointUpdateResponseEventTypesItem: {
|
|
|
12
12
|
readonly MessageHistory: "message.history";
|
|
13
13
|
readonly GroupUpdated: "group.updated";
|
|
14
14
|
readonly MessageDeleted: "message.deleted";
|
|
15
|
+
readonly MessageSent: "message.sent";
|
|
15
16
|
};
|
|
@@ -23,5 +23,8 @@ export interface WebhookEventMessageHistoryDataMessagesItem {
|
|
|
23
23
|
durationSec?: number;
|
|
24
24
|
mediaError?: string;
|
|
25
25
|
transcript: string | null;
|
|
26
|
+
subject?: string;
|
|
27
|
+
html?: string;
|
|
28
|
+
attachments?: UnlimitedMessagingApi.WebhookEventMessageHistoryDataMessagesItemAttachmentsItem[];
|
|
26
29
|
conversation: UnlimitedMessagingApi.WebhookEventMessageHistoryDataMessagesItemConversation;
|
|
27
30
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WebhookEventMessageHistoryDataMessagesItemAttachmentsItem {
|
|
5
|
+
url: string;
|
|
6
|
+
filename: string | null;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
size: number;
|
|
9
|
+
contentId: string | null;
|
|
10
|
+
}
|
|
@@ -23,4 +23,7 @@ export interface WebhookEventMessageReceivedDataMessage {
|
|
|
23
23
|
durationSec?: number;
|
|
24
24
|
mediaError?: string;
|
|
25
25
|
transcript: string | null;
|
|
26
|
+
subject?: string;
|
|
27
|
+
html?: string;
|
|
28
|
+
attachments?: UnlimitedMessagingApi.WebhookEventMessageReceivedDataMessageAttachmentsItem[];
|
|
26
29
|
}
|