sendblue 3.15.0 → 3.16.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/CHANGELOG.md +16 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/groups.d.mts +1 -1
- package/resources/groups.d.mts.map +1 -1
- package/resources/groups.d.ts +1 -1
- package/resources/groups.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +3 -0
- package/resources/messages/index.d.mts.map +1 -0
- package/resources/messages/index.d.ts +3 -0
- package/resources/messages/index.d.ts.map +1 -0
- package/resources/messages/index.js +9 -0
- package/resources/messages/index.js.map +1 -0
- package/resources/messages/index.mjs +4 -0
- package/resources/messages/index.mjs.map +1 -0
- package/resources/messages/messages.d.mts +1071 -0
- package/resources/messages/messages.d.mts.map +1 -0
- package/resources/messages/messages.d.ts +1071 -0
- package/resources/messages/messages.d.ts.map +1 -0
- package/resources/messages/messages.js +105 -0
- package/resources/messages/messages.js.map +1 -0
- package/resources/messages/messages.mjs +100 -0
- package/resources/messages/messages.mjs.map +1 -0
- package/resources/messages/v2/index.d.mts +3 -0
- package/resources/messages/v2/index.d.mts.map +1 -0
- package/resources/messages/v2/index.d.ts +3 -0
- package/resources/messages/v2/index.d.ts.map +1 -0
- package/resources/{v2/groups → messages/v2}/index.js +3 -3
- package/resources/messages/v2/index.js.map +1 -0
- package/resources/{v2/groups → messages/v2}/index.mjs +1 -1
- package/resources/messages/v2/index.mjs.map +1 -0
- package/resources/messages/v2/v2.d.mts +10 -0
- package/resources/messages/v2/v2.d.mts.map +1 -0
- package/resources/messages/v2/v2.d.ts +10 -0
- package/resources/messages/v2/v2.d.ts.map +1 -0
- package/resources/messages/v2/v2.js +17 -0
- package/resources/messages/v2/v2.js.map +1 -0
- package/resources/messages/v2/v2.mjs +12 -0
- package/resources/messages/v2/v2.mjs.map +1 -0
- package/resources/messages/v2/verify/index.d.mts.map +1 -0
- package/resources/messages/v2/verify/index.d.ts.map +1 -0
- package/resources/messages/v2/verify/index.js.map +1 -0
- package/resources/messages/v2/verify/index.mjs.map +1 -0
- package/resources/messages/v2/verify/services/index.d.mts.map +1 -0
- package/resources/messages/v2/verify/services/index.d.ts.map +1 -0
- package/resources/messages/v2/verify/services/index.js.map +1 -0
- package/resources/messages/v2/verify/services/index.mjs.map +1 -0
- package/resources/messages/v2/verify/services/services.d.mts.map +1 -0
- package/resources/messages/v2/verify/services/services.d.ts.map +1 -0
- package/resources/messages/v2/verify/services/services.js.map +1 -0
- package/resources/messages/v2/verify/services/services.mjs.map +1 -0
- package/resources/{v2/groups → messages/v2}/verify/services/verifications.d.mts +2 -2
- package/resources/messages/v2/verify/services/verifications.d.mts.map +1 -0
- package/resources/{v2/groups → messages/v2}/verify/services/verifications.d.ts +2 -2
- package/resources/messages/v2/verify/services/verifications.d.ts.map +1 -0
- package/resources/{v2/groups → messages/v2}/verify/services/verifications.js +2 -2
- package/resources/messages/v2/verify/services/verifications.js.map +1 -0
- package/resources/{v2/groups → messages/v2}/verify/services/verifications.mjs +2 -2
- package/resources/messages/v2/verify/services/verifications.mjs.map +1 -0
- package/resources/messages/v2/verify/services.d.mts.map +1 -0
- package/resources/messages/v2/verify/services.d.ts.map +1 -0
- package/resources/messages/v2/verify/services.js.map +1 -0
- package/resources/messages/v2/verify/services.mjs.map +1 -0
- package/resources/messages/v2/verify/verify.d.mts.map +1 -0
- package/resources/messages/v2/verify/verify.d.ts.map +1 -0
- package/resources/messages/v2/verify/verify.js.map +1 -0
- package/resources/messages/v2/verify/verify.mjs.map +1 -0
- package/resources/messages/v2/verify.d.mts.map +1 -0
- package/resources/messages/v2/verify.d.ts.map +1 -0
- package/resources/messages/v2/verify.js.map +1 -0
- package/resources/messages/v2/verify.mjs.map +1 -0
- package/resources/messages/v2.d.mts +2 -0
- package/resources/messages/v2.d.mts.map +1 -0
- package/resources/messages/v2.d.ts +2 -0
- package/resources/messages/v2.d.ts.map +1 -0
- package/resources/messages/v2.js +6 -0
- package/resources/messages/v2.js.map +1 -0
- package/resources/messages/v2.mjs +3 -0
- package/resources/messages/v2.mjs.map +1 -0
- package/resources/messages.d.mts +1 -1066
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +1 -1066
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +2 -93
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +1 -91
- package/resources/messages.mjs.map +1 -1
- package/resources/v2/groups.d.mts +119 -1
- package/resources/v2/groups.d.mts.map +1 -1
- package/resources/v2/groups.d.ts +119 -1
- package/resources/v2/groups.d.ts.map +1 -1
- package/resources/v2/groups.js +43 -2
- package/resources/v2/groups.js.map +1 -1
- package/resources/v2/groups.mjs +41 -1
- package/resources/v2/groups.mjs.map +1 -1
- package/resources/v2/index.d.mts +1 -1
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts +1 -1
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.js +4 -4
- package/resources/v2/index.js.map +1 -1
- package/resources/v2/index.mjs +1 -1
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/v2.d.mts +3 -3
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts +3 -3
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +2 -2
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +2 -2
- package/resources/v2/v2.mjs.map +1 -1
- package/src/client.ts +11 -11
- package/src/resources/groups.ts +1 -1
- package/src/resources/index.ts +1 -1
- package/src/resources/messages/index.ts +14 -0
- package/src/resources/messages/messages.ts +1444 -0
- package/src/resources/{v2/groups → messages/v2}/index.ts +1 -1
- package/src/resources/messages/v2/v2.ts +15 -0
- package/src/resources/{v2/groups → messages/v2}/verify/services/verifications.ts +2 -2
- package/src/resources/messages/v2.ts +3 -0
- package/src/resources/messages.ts +1 -1434
- package/src/resources/v2/groups.ts +158 -1
- package/src/resources/v2/index.ts +6 -1
- package/src/resources/v2/v2.ts +8 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v2/groups/groups.d.mts +0 -86
- package/resources/v2/groups/groups.d.mts.map +0 -1
- package/resources/v2/groups/groups.d.ts +0 -86
- package/resources/v2/groups/groups.d.ts.map +0 -1
- package/resources/v2/groups/groups.js +0 -35
- package/resources/v2/groups/groups.js.map +0 -1
- package/resources/v2/groups/groups.mjs +0 -30
- package/resources/v2/groups/groups.mjs.map +0 -1
- package/resources/v2/groups/index.d.mts +0 -3
- package/resources/v2/groups/index.d.mts.map +0 -1
- package/resources/v2/groups/index.d.ts +0 -3
- package/resources/v2/groups/index.d.ts.map +0 -1
- package/resources/v2/groups/index.js.map +0 -1
- package/resources/v2/groups/index.mjs.map +0 -1
- package/resources/v2/groups/verify/index.d.mts.map +0 -1
- package/resources/v2/groups/verify/index.d.ts.map +0 -1
- package/resources/v2/groups/verify/index.js.map +0 -1
- package/resources/v2/groups/verify/index.mjs.map +0 -1
- package/resources/v2/groups/verify/services/index.d.mts.map +0 -1
- package/resources/v2/groups/verify/services/index.d.ts.map +0 -1
- package/resources/v2/groups/verify/services/index.js.map +0 -1
- package/resources/v2/groups/verify/services/index.mjs.map +0 -1
- package/resources/v2/groups/verify/services/services.d.mts.map +0 -1
- package/resources/v2/groups/verify/services/services.d.ts.map +0 -1
- package/resources/v2/groups/verify/services/services.js.map +0 -1
- package/resources/v2/groups/verify/services/services.mjs.map +0 -1
- package/resources/v2/groups/verify/services/verifications.d.mts.map +0 -1
- package/resources/v2/groups/verify/services/verifications.d.ts.map +0 -1
- package/resources/v2/groups/verify/services/verifications.js.map +0 -1
- package/resources/v2/groups/verify/services/verifications.mjs.map +0 -1
- package/resources/v2/groups/verify/services.d.mts.map +0 -1
- package/resources/v2/groups/verify/services.d.ts.map +0 -1
- package/resources/v2/groups/verify/services.js.map +0 -1
- package/resources/v2/groups/verify/services.mjs.map +0 -1
- package/resources/v2/groups/verify/verify.d.mts.map +0 -1
- package/resources/v2/groups/verify/verify.d.ts.map +0 -1
- package/resources/v2/groups/verify/verify.js.map +0 -1
- package/resources/v2/groups/verify/verify.mjs.map +0 -1
- package/resources/v2/groups/verify.d.mts.map +0 -1
- package/resources/v2/groups/verify.d.ts.map +0 -1
- package/resources/v2/groups/verify.js.map +0 -1
- package/resources/v2/groups/verify.mjs.map +0 -1
- package/src/resources/v2/groups/groups.ts +0 -114
- /package/resources/{v2/groups → messages/v2}/verify/index.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/index.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/index.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/index.mjs +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/index.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/index.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/index.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/index.mjs +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/services.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/services.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/services.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services/services.mjs +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/services.mjs +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/verify.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/verify.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/verify.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify/verify.mjs +0 -0
- /package/resources/{v2/groups → messages/v2}/verify.d.mts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify.d.ts +0 -0
- /package/resources/{v2/groups → messages/v2}/verify.js +0 -0
- /package/resources/{v2/groups → messages/v2}/verify.mjs +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify/index.ts +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify/services/index.ts +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify/services/services.ts +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify/services.ts +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify/verify.ts +0 -0
- /package/src/resources/{v2/groups → messages/v2}/verify.ts +0 -0
package/resources/messages.d.ts
CHANGED
|
@@ -1,1067 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* Operations for sending and managing messages
|
|
6
|
-
*/
|
|
7
|
-
export declare class Messages extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve details of a specific message by its ID
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const message = await client.messages.retrieve(
|
|
14
|
-
* 'msg_abc123def456',
|
|
15
|
-
* );
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
retrieve(messageID: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieve a list of messages for the authenticated account with comprehensive
|
|
21
|
-
* filtering capabilities. Rate limited to 100 requests per 10 seconds per account.
|
|
22
|
-
*
|
|
23
|
-
* ## Common Use Cases
|
|
24
|
-
*
|
|
25
|
-
* **Polling for inbound messages (no webhooks):**
|
|
26
|
-
*
|
|
27
|
-
* ```
|
|
28
|
-
* GET /api/v2/messages?is_outbound=false&sendblue_number=+16292925296&order_by=createdAt&order_direction=desc&limit=50
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* Track processed message IDs to avoid duplicates.
|
|
32
|
-
*
|
|
33
|
-
* **Get conversation with a specific contact:**
|
|
34
|
-
*
|
|
35
|
-
* ```
|
|
36
|
-
* GET /api/v2/messages?number=+15551234567&order_by=createdAt&order_direction=desc
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const messages = await client.messages.list();
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
list(query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* Retrieve the current status of a message using its message handle. Useful for
|
|
47
|
-
* resolving pending message statuses and avoiding duplicate messages.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const messageResponse = await client.messages.getStatus({
|
|
52
|
-
* handle: 'msg_abc123def456',
|
|
53
|
-
* });
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
getStatus(query: MessageGetStatusParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Send an iMessage, SMS, MMS, or Sendblue App Card to a single recipient
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* const messageResponse = await client.messages.send({
|
|
63
|
-
* from_number: '+19998887777',
|
|
64
|
-
* number: '+19998887777',
|
|
65
|
-
* });
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
send(body: MessageSendParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
69
|
-
/**
|
|
70
|
-
* Continues an existing App Card by sending a new Apple message in the same
|
|
71
|
-
* iMessage session, from the same sender line and inline-reply context. The
|
|
72
|
-
* continuation receives its own message handle and delivery/read status updates.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```ts
|
|
76
|
-
* const messageResponse = await client.messages.updateAppCard(
|
|
77
|
-
* 'message_handle',
|
|
78
|
-
* );
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
updateAppCard(messageHandle: string, body: MessageUpdateAppCardParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
82
|
-
}
|
|
83
|
-
export interface MessageContent {
|
|
84
|
-
/**
|
|
85
|
-
* Email of the account
|
|
86
|
-
*/
|
|
87
|
-
account_email?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Message content
|
|
90
|
-
*/
|
|
91
|
-
content?: string;
|
|
92
|
-
/**
|
|
93
|
-
* When the message was created
|
|
94
|
-
*/
|
|
95
|
-
date_created?: string;
|
|
96
|
-
/**
|
|
97
|
-
* When the message was sent
|
|
98
|
-
*/
|
|
99
|
-
date_sent?: string;
|
|
100
|
-
/**
|
|
101
|
-
* When the message was last updated
|
|
102
|
-
*/
|
|
103
|
-
date_updated?: string;
|
|
104
|
-
/**
|
|
105
|
-
* Sender phone number
|
|
106
|
-
*/
|
|
107
|
-
from_number?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Whether this is an outbound message
|
|
110
|
-
*/
|
|
111
|
-
is_outbound?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* URL of attached media
|
|
114
|
-
*/
|
|
115
|
-
media_url?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Unique message identifier
|
|
118
|
-
*/
|
|
119
|
-
message_handle?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
122
|
-
* account, conversation, and sending line.
|
|
123
|
-
*/
|
|
124
|
-
reply_to?: MessageContent.ReplyTo;
|
|
125
|
-
/**
|
|
126
|
-
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
127
|
-
* send, or for dashboard-originated group messages.
|
|
128
|
-
*/
|
|
129
|
-
seat_id?: string | null;
|
|
130
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
131
|
-
/**
|
|
132
|
-
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
133
|
-
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
134
|
-
*/
|
|
135
|
-
sender_email?: string | null;
|
|
136
|
-
status?: 'QUEUED' | 'SENT' | 'DELIVERED' | 'ERROR' | 'RECEIVED';
|
|
137
|
-
/**
|
|
138
|
-
* Message that originated an iMessage inline-reply thread.
|
|
139
|
-
*/
|
|
140
|
-
thread_originator?: MessageContent.ThreadOriginator;
|
|
141
|
-
/**
|
|
142
|
-
* Recipient phone number
|
|
143
|
-
*/
|
|
144
|
-
to_number?: string;
|
|
145
|
-
}
|
|
146
|
-
export declare namespace MessageContent {
|
|
147
|
-
/**
|
|
148
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
149
|
-
* account, conversation, and sending line.
|
|
150
|
-
*/
|
|
151
|
-
interface ReplyTo {
|
|
152
|
-
/**
|
|
153
|
-
* Public handle of the immediate parent message
|
|
154
|
-
*/
|
|
155
|
-
message_handle: string;
|
|
156
|
-
/**
|
|
157
|
-
* Advanced override for a known part of a multipart target. Omit this in normal
|
|
158
|
-
* reply requests and never guess it; requests default to 0. When replying to an
|
|
159
|
-
* attachment represented by its own webhook, use that webhook's `message_handle`
|
|
160
|
-
* and omit `part_index` so Sendblue can use the stored authoritative part.
|
|
161
|
-
* Responses omit it when no authoritative immediate-parent part is available.
|
|
162
|
-
*/
|
|
163
|
-
part_index?: number;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Message that originated an iMessage inline-reply thread.
|
|
167
|
-
*/
|
|
168
|
-
interface ThreadOriginator {
|
|
169
|
-
/**
|
|
170
|
-
* Public handle of the thread's root message
|
|
171
|
-
*/
|
|
172
|
-
message_handle: string;
|
|
173
|
-
/**
|
|
174
|
-
* Opaque Apple thread-originator part descriptor
|
|
175
|
-
*/
|
|
176
|
-
part?: string;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
export interface MessageResponse {
|
|
180
|
-
/**
|
|
181
|
-
* Email of the account that sent the message
|
|
182
|
-
*/
|
|
183
|
-
account_email?: string;
|
|
184
|
-
/**
|
|
185
|
-
* App Card data sent or received with this message.
|
|
186
|
-
*/
|
|
187
|
-
app_card?: MessageResponse.AppCard | MessageResponse.InboundAppCard;
|
|
188
|
-
/**
|
|
189
|
-
* Message content
|
|
190
|
-
*/
|
|
191
|
-
content?: string;
|
|
192
|
-
/**
|
|
193
|
-
* When the message was created
|
|
194
|
-
*/
|
|
195
|
-
date_created?: string;
|
|
196
|
-
/**
|
|
197
|
-
* When the message was last updated
|
|
198
|
-
*/
|
|
199
|
-
date_updated?: string;
|
|
200
|
-
/**
|
|
201
|
-
* Numeric error code if message failed
|
|
202
|
-
*/
|
|
203
|
-
error_code?: number;
|
|
204
|
-
/**
|
|
205
|
-
* Error message if message failed
|
|
206
|
-
*/
|
|
207
|
-
error_message?: string;
|
|
208
|
-
/**
|
|
209
|
-
* Sending phone number
|
|
210
|
-
*/
|
|
211
|
-
from_number?: string;
|
|
212
|
-
/**
|
|
213
|
-
* Whether this is an outbound message
|
|
214
|
-
*/
|
|
215
|
-
is_outbound?: boolean;
|
|
216
|
-
/**
|
|
217
|
-
* Decoded Find My location share coordinates.
|
|
218
|
-
*/
|
|
219
|
-
location?: MessageResponse.Location;
|
|
220
|
-
/**
|
|
221
|
-
* URL of attached media
|
|
222
|
-
*/
|
|
223
|
-
media_url?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Unique identifier for tracking the message
|
|
226
|
-
*/
|
|
227
|
-
message_handle?: string;
|
|
228
|
-
message_type?: 'message' | 'group' | 'location';
|
|
229
|
-
/**
|
|
230
|
-
* Recipient phone number
|
|
231
|
-
*/
|
|
232
|
-
number?: string;
|
|
233
|
-
/**
|
|
234
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
235
|
-
* account, conversation, and sending line.
|
|
236
|
-
*/
|
|
237
|
-
reply_to?: MessageResponse.ReplyTo;
|
|
238
|
-
/**
|
|
239
|
-
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
240
|
-
* send, or for dashboard-originated group messages.
|
|
241
|
-
*/
|
|
242
|
-
seat_id?: string | null;
|
|
243
|
-
/**
|
|
244
|
-
* The iMessage expressive message style
|
|
245
|
-
*/
|
|
246
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
247
|
-
/**
|
|
248
|
-
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
249
|
-
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
250
|
-
*/
|
|
251
|
-
sender_email?: string | null;
|
|
252
|
-
status?: 'QUEUED' | 'SENT' | 'DELIVERED' | 'ERROR';
|
|
253
|
-
/**
|
|
254
|
-
* Message that originated an iMessage inline-reply thread.
|
|
255
|
-
*/
|
|
256
|
-
thread_originator?: MessageResponse.ThreadOriginator;
|
|
257
|
-
}
|
|
258
|
-
export declare namespace MessageResponse {
|
|
259
|
-
/**
|
|
260
|
-
* A Sendblue App Card rendered with Apple's Messages framework. App Cards require
|
|
261
|
-
* a V2 Mac line and an iMessage-capable recipient; they never fall back to SMS.
|
|
262
|
-
* The URL is delivered to the identified Messages extension when the recipient
|
|
263
|
-
* taps the card. An initial App Card may include `reply_to` to create an inline
|
|
264
|
-
* reply. Later state changes use the update endpoint, which sends a new Apple
|
|
265
|
-
* message in the same App Card session. The feature is unavailable on the free
|
|
266
|
-
* plan.
|
|
267
|
-
*/
|
|
268
|
-
interface AppCard {
|
|
269
|
-
appName: string;
|
|
270
|
-
extensionBundleId: string;
|
|
271
|
-
/**
|
|
272
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
273
|
-
*/
|
|
274
|
-
layout: AppCard.Layout;
|
|
275
|
-
teamId: string;
|
|
276
|
-
/**
|
|
277
|
-
* URL delivered to the iMessage extension on tap. HTTPS URLs are limited to 2048
|
|
278
|
-
* characters; data URLs carrying inline app state are limited to 16384.
|
|
279
|
-
*/
|
|
280
|
-
url: string;
|
|
281
|
-
/**
|
|
282
|
-
* Optional numeric App Store ID for recipients without the extension.
|
|
283
|
-
*/
|
|
284
|
-
appStoreId?: number;
|
|
285
|
-
/**
|
|
286
|
-
* Fallback text for notifications and surfaces that cannot render the card.
|
|
287
|
-
*/
|
|
288
|
-
fallbackText?: string;
|
|
289
|
-
/**
|
|
290
|
-
* Use Apple's live layout when the extension is installed; false always sends the
|
|
291
|
-
* static template layout.
|
|
292
|
-
*/
|
|
293
|
-
interactive?: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Optional caller-supplied App Card session UUID. Generated automatically when
|
|
296
|
-
* omitted.
|
|
297
|
-
*/
|
|
298
|
-
sessionIdentifier?: string;
|
|
299
|
-
/**
|
|
300
|
-
* Original message handle for an App Card continuation returned by the update
|
|
301
|
-
* endpoint.
|
|
302
|
-
*/
|
|
303
|
-
updateMessageHandle?: string;
|
|
304
|
-
}
|
|
305
|
-
namespace AppCard {
|
|
306
|
-
/**
|
|
307
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
308
|
-
*/
|
|
309
|
-
interface Layout {
|
|
310
|
-
caption?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Secondary text overlaid on the preview image. Requires imageUrl.
|
|
313
|
-
*/
|
|
314
|
-
imageSubtitle?: string;
|
|
315
|
-
/**
|
|
316
|
-
* Text overlaid on the preview image. Requires imageUrl.
|
|
317
|
-
*/
|
|
318
|
-
imageTitle?: string;
|
|
319
|
-
/**
|
|
320
|
-
* HTTPS preview image fetched by the worker and sent as a hidden card attachment.
|
|
321
|
-
* JPEG, PNG, HEIC, HEIF, and WebP are supported up to 10 MB.
|
|
322
|
-
*/
|
|
323
|
-
imageUrl?: string;
|
|
324
|
-
subcaption?: string;
|
|
325
|
-
/**
|
|
326
|
-
* Fallback text used in notifications and non-rendering surfaces.
|
|
327
|
-
*/
|
|
328
|
-
summary?: string;
|
|
329
|
-
trailingCaption?: string;
|
|
330
|
-
trailingSubcaption?: string;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* App Card session metadata received from an iMessage contact.
|
|
335
|
-
*/
|
|
336
|
-
interface InboundAppCard {
|
|
337
|
-
balloonBundleId: string;
|
|
338
|
-
extensionBundleId: string;
|
|
339
|
-
/**
|
|
340
|
-
* Retry-stable occurrence revision assigned to this inbound App Card state.
|
|
341
|
-
*/
|
|
342
|
-
revision: number;
|
|
343
|
-
sessionIdentifier: string;
|
|
344
|
-
teamId: string;
|
|
345
|
-
url: string;
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Decoded Find My location share coordinates.
|
|
349
|
-
*/
|
|
350
|
-
interface Location {
|
|
351
|
-
latitude: number;
|
|
352
|
-
longitude: number;
|
|
353
|
-
/**
|
|
354
|
-
* Horizontal accuracy in meters
|
|
355
|
-
*/
|
|
356
|
-
accuracy?: number;
|
|
357
|
-
/**
|
|
358
|
-
* Altitude in meters
|
|
359
|
-
*/
|
|
360
|
-
altitude?: number;
|
|
361
|
-
/**
|
|
362
|
-
* Share duration selected by the recipient
|
|
363
|
-
*/
|
|
364
|
-
duration?: string;
|
|
365
|
-
timestamp?: string;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
369
|
-
* account, conversation, and sending line.
|
|
370
|
-
*/
|
|
371
|
-
interface ReplyTo {
|
|
372
|
-
/**
|
|
373
|
-
* Public handle of the immediate parent message
|
|
374
|
-
*/
|
|
375
|
-
message_handle: string;
|
|
376
|
-
/**
|
|
377
|
-
* Advanced override for a known part of a multipart target. Omit this in normal
|
|
378
|
-
* reply requests and never guess it; requests default to 0. When replying to an
|
|
379
|
-
* attachment represented by its own webhook, use that webhook's `message_handle`
|
|
380
|
-
* and omit `part_index` so Sendblue can use the stored authoritative part.
|
|
381
|
-
* Responses omit it when no authoritative immediate-parent part is available.
|
|
382
|
-
*/
|
|
383
|
-
part_index?: number;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Message that originated an iMessage inline-reply thread.
|
|
387
|
-
*/
|
|
388
|
-
interface ThreadOriginator {
|
|
389
|
-
/**
|
|
390
|
-
* Public handle of the thread's root message
|
|
391
|
-
*/
|
|
392
|
-
message_handle: string;
|
|
393
|
-
/**
|
|
394
|
-
* Opaque Apple thread-originator part descriptor
|
|
395
|
-
*/
|
|
396
|
-
part?: string;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
export interface MessageRetrieveResponse {
|
|
400
|
-
data?: MessageRetrieveResponse.Data;
|
|
401
|
-
status?: string;
|
|
402
|
-
}
|
|
403
|
-
export declare namespace MessageRetrieveResponse {
|
|
404
|
-
interface Data {
|
|
405
|
-
/**
|
|
406
|
-
* Email of the account
|
|
407
|
-
*/
|
|
408
|
-
accountEmail?: string;
|
|
409
|
-
/**
|
|
410
|
-
* Message content
|
|
411
|
-
*/
|
|
412
|
-
content?: string;
|
|
413
|
-
/**
|
|
414
|
-
* When the message was sent
|
|
415
|
-
*/
|
|
416
|
-
date_sent?: string;
|
|
417
|
-
/**
|
|
418
|
-
* When the message was last updated
|
|
419
|
-
*/
|
|
420
|
-
date_updated?: string;
|
|
421
|
-
/**
|
|
422
|
-
* Numeric error code if message failed
|
|
423
|
-
*/
|
|
424
|
-
error_code?: number | null;
|
|
425
|
-
/**
|
|
426
|
-
* Detailed error information
|
|
427
|
-
*/
|
|
428
|
-
error_detail?: string | null;
|
|
429
|
-
/**
|
|
430
|
-
* Error message if message failed
|
|
431
|
-
*/
|
|
432
|
-
error_message?: string | null;
|
|
433
|
-
/**
|
|
434
|
-
* Error reason if message failed
|
|
435
|
-
*/
|
|
436
|
-
error_reason?: string | null;
|
|
437
|
-
/**
|
|
438
|
-
* Sender phone number
|
|
439
|
-
*/
|
|
440
|
-
from_number?: string;
|
|
441
|
-
/**
|
|
442
|
-
* Display name for group messages
|
|
443
|
-
*/
|
|
444
|
-
group_display_name?: string | null;
|
|
445
|
-
/**
|
|
446
|
-
* Group ID for group messages
|
|
447
|
-
*/
|
|
448
|
-
group_id?: string | null;
|
|
449
|
-
/**
|
|
450
|
-
* Whether this is an outbound message
|
|
451
|
-
*/
|
|
452
|
-
is_outbound?: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* Decoded Find My location share coordinates.
|
|
455
|
-
*/
|
|
456
|
-
location?: Data.Location;
|
|
457
|
-
/**
|
|
458
|
-
* URL of attached media
|
|
459
|
-
*/
|
|
460
|
-
media_url?: string | null;
|
|
461
|
-
/**
|
|
462
|
-
* Unique message identifier
|
|
463
|
-
*/
|
|
464
|
-
message_handle?: string;
|
|
465
|
-
message_type?: 'message' | 'group' | 'location';
|
|
466
|
-
/**
|
|
467
|
-
* Primary phone number (to_number for outbound, from_number for inbound)
|
|
468
|
-
*/
|
|
469
|
-
number?: string;
|
|
470
|
-
/**
|
|
471
|
-
* Whether the recipient has opted out
|
|
472
|
-
*/
|
|
473
|
-
opted_out?: boolean;
|
|
474
|
-
/**
|
|
475
|
-
* List of participants for group messages
|
|
476
|
-
*/
|
|
477
|
-
participants?: Array<string>;
|
|
478
|
-
/**
|
|
479
|
-
* Account plan used for this message
|
|
480
|
-
*/
|
|
481
|
-
plan?: string;
|
|
482
|
-
/**
|
|
483
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
484
|
-
* account, conversation, and sending line.
|
|
485
|
-
*/
|
|
486
|
-
reply_to?: Data.ReplyTo;
|
|
487
|
-
/**
|
|
488
|
-
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
489
|
-
* send, or for dashboard-originated group messages.
|
|
490
|
-
*/
|
|
491
|
-
seat_id?: string | null;
|
|
492
|
-
/**
|
|
493
|
-
* The iMessage expressive message style
|
|
494
|
-
*/
|
|
495
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
496
|
-
/**
|
|
497
|
-
* Sendblue phone number used
|
|
498
|
-
*/
|
|
499
|
-
sendblue_number?: string | null;
|
|
500
|
-
/**
|
|
501
|
-
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
502
|
-
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
503
|
-
*/
|
|
504
|
-
sender_email?: string | null;
|
|
505
|
-
/**
|
|
506
|
-
* The messaging service used
|
|
507
|
-
*/
|
|
508
|
-
service?: 'iMessage' | 'SMS' | 'RCS';
|
|
509
|
-
status?: 'REGISTERED' | 'PENDING' | 'SENT' | 'DELIVERED' | 'RECEIVED' | 'QUEUED' | 'ERROR' | 'DECLINED' | 'ACCEPTED' | 'SUCCESS';
|
|
510
|
-
/**
|
|
511
|
-
* Message that originated an iMessage inline-reply thread.
|
|
512
|
-
*/
|
|
513
|
-
thread_originator?: Data.ThreadOriginator;
|
|
514
|
-
/**
|
|
515
|
-
* Recipient phone number
|
|
516
|
-
*/
|
|
517
|
-
to_number?: string;
|
|
518
|
-
/**
|
|
519
|
-
* Whether the message was downgraded from iMessage to SMS
|
|
520
|
-
*/
|
|
521
|
-
was_downgraded?: boolean;
|
|
522
|
-
}
|
|
523
|
-
namespace Data {
|
|
524
|
-
/**
|
|
525
|
-
* Decoded Find My location share coordinates.
|
|
526
|
-
*/
|
|
527
|
-
interface Location {
|
|
528
|
-
latitude: number;
|
|
529
|
-
longitude: number;
|
|
530
|
-
/**
|
|
531
|
-
* Horizontal accuracy in meters
|
|
532
|
-
*/
|
|
533
|
-
accuracy?: number;
|
|
534
|
-
/**
|
|
535
|
-
* Altitude in meters
|
|
536
|
-
*/
|
|
537
|
-
altitude?: number;
|
|
538
|
-
/**
|
|
539
|
-
* Share duration selected by the recipient
|
|
540
|
-
*/
|
|
541
|
-
duration?: string;
|
|
542
|
-
timestamp?: string;
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
546
|
-
* account, conversation, and sending line.
|
|
547
|
-
*/
|
|
548
|
-
interface ReplyTo {
|
|
549
|
-
/**
|
|
550
|
-
* Public handle of the immediate parent message
|
|
551
|
-
*/
|
|
552
|
-
message_handle: string;
|
|
553
|
-
/**
|
|
554
|
-
* Advanced override for a known part of a multipart target. Omit this in normal
|
|
555
|
-
* reply requests and never guess it; requests default to 0. When replying to an
|
|
556
|
-
* attachment represented by its own webhook, use that webhook's `message_handle`
|
|
557
|
-
* and omit `part_index` so Sendblue can use the stored authoritative part.
|
|
558
|
-
* Responses omit it when no authoritative immediate-parent part is available.
|
|
559
|
-
*/
|
|
560
|
-
part_index?: number;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Message that originated an iMessage inline-reply thread.
|
|
564
|
-
*/
|
|
565
|
-
interface ThreadOriginator {
|
|
566
|
-
/**
|
|
567
|
-
* Public handle of the thread's root message
|
|
568
|
-
*/
|
|
569
|
-
message_handle: string;
|
|
570
|
-
/**
|
|
571
|
-
* Opaque Apple thread-originator part descriptor
|
|
572
|
-
*/
|
|
573
|
-
part?: string;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
export interface MessageListResponse {
|
|
578
|
-
data?: Array<MessageListResponse.Data>;
|
|
579
|
-
pagination?: MessageListResponse.Pagination;
|
|
580
|
-
status?: string;
|
|
581
|
-
}
|
|
582
|
-
export declare namespace MessageListResponse {
|
|
583
|
-
interface Data {
|
|
584
|
-
/**
|
|
585
|
-
* Email of the account
|
|
586
|
-
*/
|
|
587
|
-
accountEmail?: string;
|
|
588
|
-
/**
|
|
589
|
-
* Message content
|
|
590
|
-
*/
|
|
591
|
-
content?: string;
|
|
592
|
-
/**
|
|
593
|
-
* When the message was sent
|
|
594
|
-
*/
|
|
595
|
-
date_sent?: string;
|
|
596
|
-
/**
|
|
597
|
-
* When the message was last updated
|
|
598
|
-
*/
|
|
599
|
-
date_updated?: string;
|
|
600
|
-
/**
|
|
601
|
-
* Numeric error code if message failed
|
|
602
|
-
*/
|
|
603
|
-
error_code?: number | null;
|
|
604
|
-
/**
|
|
605
|
-
* Detailed error information
|
|
606
|
-
*/
|
|
607
|
-
error_detail?: string | null;
|
|
608
|
-
/**
|
|
609
|
-
* Error message if message failed
|
|
610
|
-
*/
|
|
611
|
-
error_message?: string | null;
|
|
612
|
-
/**
|
|
613
|
-
* Error reason if message failed
|
|
614
|
-
*/
|
|
615
|
-
error_reason?: string | null;
|
|
616
|
-
/**
|
|
617
|
-
* Sender phone number
|
|
618
|
-
*/
|
|
619
|
-
from_number?: string;
|
|
620
|
-
/**
|
|
621
|
-
* Display name for group messages
|
|
622
|
-
*/
|
|
623
|
-
group_display_name?: string | null;
|
|
624
|
-
/**
|
|
625
|
-
* Group ID for group messages
|
|
626
|
-
*/
|
|
627
|
-
group_id?: string | null;
|
|
628
|
-
/**
|
|
629
|
-
* Whether this is an outbound message
|
|
630
|
-
*/
|
|
631
|
-
is_outbound?: boolean;
|
|
632
|
-
/**
|
|
633
|
-
* Decoded Find My location share coordinates.
|
|
634
|
-
*/
|
|
635
|
-
location?: Data.Location;
|
|
636
|
-
/**
|
|
637
|
-
* URL of attached media
|
|
638
|
-
*/
|
|
639
|
-
media_url?: string | null;
|
|
640
|
-
/**
|
|
641
|
-
* Unique message identifier
|
|
642
|
-
*/
|
|
643
|
-
message_handle?: string;
|
|
644
|
-
message_type?: 'message' | 'group' | 'location';
|
|
645
|
-
/**
|
|
646
|
-
* Primary phone number (to_number for outbound, from_number for inbound)
|
|
647
|
-
*/
|
|
648
|
-
number?: string;
|
|
649
|
-
/**
|
|
650
|
-
* Whether the recipient has opted out
|
|
651
|
-
*/
|
|
652
|
-
opted_out?: boolean;
|
|
653
|
-
/**
|
|
654
|
-
* List of participants for group messages
|
|
655
|
-
*/
|
|
656
|
-
participants?: Array<string>;
|
|
657
|
-
/**
|
|
658
|
-
* Account plan used for this message
|
|
659
|
-
*/
|
|
660
|
-
plan?: string;
|
|
661
|
-
/**
|
|
662
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
663
|
-
* account, conversation, and sending line.
|
|
664
|
-
*/
|
|
665
|
-
reply_to?: Data.ReplyTo;
|
|
666
|
-
/**
|
|
667
|
-
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
668
|
-
* send, or for dashboard-originated group messages.
|
|
669
|
-
*/
|
|
670
|
-
seat_id?: string | null;
|
|
671
|
-
/**
|
|
672
|
-
* The iMessage expressive message style
|
|
673
|
-
*/
|
|
674
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
675
|
-
/**
|
|
676
|
-
* Sendblue phone number used
|
|
677
|
-
*/
|
|
678
|
-
sendblue_number?: string | null;
|
|
679
|
-
/**
|
|
680
|
-
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
681
|
-
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
682
|
-
*/
|
|
683
|
-
sender_email?: string | null;
|
|
684
|
-
/**
|
|
685
|
-
* The messaging service used
|
|
686
|
-
*/
|
|
687
|
-
service?: 'iMessage' | 'SMS' | 'RCS';
|
|
688
|
-
status?: 'REGISTERED' | 'PENDING' | 'SENT' | 'DELIVERED' | 'RECEIVED' | 'QUEUED' | 'ERROR' | 'DECLINED' | 'ACCEPTED' | 'SUCCESS';
|
|
689
|
-
/**
|
|
690
|
-
* Message that originated an iMessage inline-reply thread.
|
|
691
|
-
*/
|
|
692
|
-
thread_originator?: Data.ThreadOriginator;
|
|
693
|
-
/**
|
|
694
|
-
* Recipient phone number
|
|
695
|
-
*/
|
|
696
|
-
to_number?: string;
|
|
697
|
-
/**
|
|
698
|
-
* Whether the message was downgraded from iMessage to SMS
|
|
699
|
-
*/
|
|
700
|
-
was_downgraded?: boolean;
|
|
701
|
-
}
|
|
702
|
-
namespace Data {
|
|
703
|
-
/**
|
|
704
|
-
* Decoded Find My location share coordinates.
|
|
705
|
-
*/
|
|
706
|
-
interface Location {
|
|
707
|
-
latitude: number;
|
|
708
|
-
longitude: number;
|
|
709
|
-
/**
|
|
710
|
-
* Horizontal accuracy in meters
|
|
711
|
-
*/
|
|
712
|
-
accuracy?: number;
|
|
713
|
-
/**
|
|
714
|
-
* Altitude in meters
|
|
715
|
-
*/
|
|
716
|
-
altitude?: number;
|
|
717
|
-
/**
|
|
718
|
-
* Share duration selected by the recipient
|
|
719
|
-
*/
|
|
720
|
-
duration?: string;
|
|
721
|
-
timestamp?: string;
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Immediate parent of an iMessage inline reply. The target must belong to the same
|
|
725
|
-
* account, conversation, and sending line.
|
|
726
|
-
*/
|
|
727
|
-
interface ReplyTo {
|
|
728
|
-
/**
|
|
729
|
-
* Public handle of the immediate parent message
|
|
730
|
-
*/
|
|
731
|
-
message_handle: string;
|
|
732
|
-
/**
|
|
733
|
-
* Advanced override for a known part of a multipart target. Omit this in normal
|
|
734
|
-
* reply requests and never guess it; requests default to 0. When replying to an
|
|
735
|
-
* attachment represented by its own webhook, use that webhook's `message_handle`
|
|
736
|
-
* and omit `part_index` so Sendblue can use the stored authoritative part.
|
|
737
|
-
* Responses omit it when no authoritative immediate-parent part is available.
|
|
738
|
-
*/
|
|
739
|
-
part_index?: number;
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* Message that originated an iMessage inline-reply thread.
|
|
743
|
-
*/
|
|
744
|
-
interface ThreadOriginator {
|
|
745
|
-
/**
|
|
746
|
-
* Public handle of the thread's root message
|
|
747
|
-
*/
|
|
748
|
-
message_handle: string;
|
|
749
|
-
/**
|
|
750
|
-
* Opaque Apple thread-originator part descriptor
|
|
751
|
-
*/
|
|
752
|
-
part?: string;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
interface Pagination {
|
|
756
|
-
/**
|
|
757
|
-
* Whether there are more messages available
|
|
758
|
-
*/
|
|
759
|
-
hasMore?: boolean;
|
|
760
|
-
/**
|
|
761
|
-
* Number of messages returned in this request
|
|
762
|
-
*/
|
|
763
|
-
limit?: number;
|
|
764
|
-
/**
|
|
765
|
-
* Number of messages skipped
|
|
766
|
-
*/
|
|
767
|
-
offset?: number;
|
|
768
|
-
/**
|
|
769
|
-
* Total number of messages matching the filters
|
|
770
|
-
*/
|
|
771
|
-
total?: number;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
export interface MessageListParams {
|
|
775
|
-
/**
|
|
776
|
-
* Filter by account email
|
|
777
|
-
*/
|
|
778
|
-
account_email?: string;
|
|
779
|
-
/**
|
|
780
|
-
* Filter messages created after this date (ISO 8601 format)
|
|
781
|
-
*/
|
|
782
|
-
created_at_gte?: string;
|
|
783
|
-
/**
|
|
784
|
-
* Filter messages created before this date (ISO 8601 format)
|
|
785
|
-
*/
|
|
786
|
-
created_at_lte?: string;
|
|
787
|
-
/**
|
|
788
|
-
* Filter by sender phone number
|
|
789
|
-
*/
|
|
790
|
-
from_number?: string;
|
|
791
|
-
/**
|
|
792
|
-
* Filter by group ID
|
|
793
|
-
*/
|
|
794
|
-
group_id?: string;
|
|
795
|
-
/**
|
|
796
|
-
* Filter by message direction. Use `false` to get inbound messages (messages sent
|
|
797
|
-
* TO your Sendblue number).
|
|
798
|
-
*
|
|
799
|
-
* **To get inbound messages for polling:** Use `is_outbound=false` combined with
|
|
800
|
-
* `sendblue_number` or `to_number` set to your Sendblue phone number.
|
|
801
|
-
*
|
|
802
|
-
* Note: Do NOT use `message_type=inbound` - that parameter only accepts `message`
|
|
803
|
-
* or `group` values.
|
|
804
|
-
*/
|
|
805
|
-
is_outbound?: 'true' | 'false';
|
|
806
|
-
/**
|
|
807
|
-
* Maximum number of messages to return
|
|
808
|
-
*/
|
|
809
|
-
limit?: number;
|
|
810
|
-
/**
|
|
811
|
-
* Filter by message type (1:1 vs group chat). Only accepts `message` or `group`.
|
|
812
|
-
*
|
|
813
|
-
* **Common mistake:** This is NOT for filtering inbound vs outbound messages. Use
|
|
814
|
-
* `is_outbound` parameter instead.
|
|
815
|
-
*/
|
|
816
|
-
message_type?: 'message' | 'group';
|
|
817
|
-
/**
|
|
818
|
-
* Filter by any phone number (from or to)
|
|
819
|
-
*/
|
|
820
|
-
number?: string;
|
|
821
|
-
/**
|
|
822
|
-
* Number of messages to skip
|
|
823
|
-
*/
|
|
824
|
-
offset?: number;
|
|
825
|
-
/**
|
|
826
|
-
* Field to order messages by
|
|
827
|
-
*/
|
|
828
|
-
order_by?: 'createdAt' | 'updatedAt' | 'sentAt';
|
|
829
|
-
/**
|
|
830
|
-
* Sort order
|
|
831
|
-
*/
|
|
832
|
-
order_direction?: 'asc' | 'desc';
|
|
833
|
-
/**
|
|
834
|
-
* Filter by Sendblue phone number
|
|
835
|
-
*/
|
|
836
|
-
sendblue_number?: string;
|
|
837
|
-
/**
|
|
838
|
-
* Filter messages sent after this date (ISO 8601 format)
|
|
839
|
-
*/
|
|
840
|
-
sent_at_gte?: string;
|
|
841
|
-
/**
|
|
842
|
-
* Filter messages sent before this date (ISO 8601 format)
|
|
843
|
-
*/
|
|
844
|
-
sent_at_lte?: string;
|
|
845
|
-
/**
|
|
846
|
-
* Filter by service type
|
|
847
|
-
*/
|
|
848
|
-
service?: 'iMessage' | 'SMS' | 'RCS';
|
|
849
|
-
/**
|
|
850
|
-
* Filter by message status
|
|
851
|
-
*/
|
|
852
|
-
status?: 'REGISTERED' | 'PENDING' | 'SENT' | 'DELIVERED' | 'RECEIVED' | 'QUEUED' | 'ERROR' | 'DECLINED' | 'ACCEPTED' | 'SUCCESS';
|
|
853
|
-
/**
|
|
854
|
-
* Filter by recipient phone number
|
|
855
|
-
*/
|
|
856
|
-
to_number?: string;
|
|
857
|
-
/**
|
|
858
|
-
* Filter messages updated after this date (ISO 8601 format)
|
|
859
|
-
*/
|
|
860
|
-
updated_at_gte?: string;
|
|
861
|
-
/**
|
|
862
|
-
* Filter messages updated before this date (ISO 8601 format)
|
|
863
|
-
*/
|
|
864
|
-
updated_at_lte?: string;
|
|
865
|
-
/**
|
|
866
|
-
* Filter by worker ID (Admin only)
|
|
867
|
-
*/
|
|
868
|
-
worker_id?: string;
|
|
869
|
-
}
|
|
870
|
-
export interface MessageGetStatusParams {
|
|
871
|
-
/**
|
|
872
|
-
* The message handle of the message you want to check status for
|
|
873
|
-
*/
|
|
874
|
-
handle: string;
|
|
875
|
-
}
|
|
876
|
-
export interface MessageSendParams {
|
|
877
|
-
/**
|
|
878
|
-
* **REQUIRED** - The phone number to send from. Must be one of your registered
|
|
879
|
-
* Sendblue phone numbers in E.164 format. Without this parameter, the message will
|
|
880
|
-
* fail to send.
|
|
881
|
-
*/
|
|
882
|
-
from_number: string;
|
|
883
|
-
/**
|
|
884
|
-
* Recipient phone number in E.164 format
|
|
885
|
-
*/
|
|
886
|
-
number: string;
|
|
887
|
-
/**
|
|
888
|
-
* A Sendblue App Card rendered with Apple's Messages framework. App Cards require
|
|
889
|
-
* a V2 Mac line and an iMessage-capable recipient; they never fall back to SMS.
|
|
890
|
-
* The URL is delivered to the identified Messages extension when the recipient
|
|
891
|
-
* taps the card. An initial App Card may include `reply_to` to create an inline
|
|
892
|
-
* reply. Later state changes use the update endpoint, which sends a new Apple
|
|
893
|
-
* message in the same App Card session. The feature is unavailable on the free
|
|
894
|
-
* plan.
|
|
895
|
-
*/
|
|
896
|
-
app_card?: MessageSendParams.AppCard;
|
|
897
|
-
/**
|
|
898
|
-
* Message text content. Optional when `media_url` or `app_card` is provided.
|
|
899
|
-
*/
|
|
900
|
-
content?: string;
|
|
901
|
-
/**
|
|
902
|
-
* URL of media file to send (images, videos, etc.)
|
|
903
|
-
*/
|
|
904
|
-
media_url?: string;
|
|
905
|
-
/**
|
|
906
|
-
* Optional inline-reply target. This may be combined with `app_card`; the
|
|
907
|
-
* resulting App Card is sent as an inline reply to the target.
|
|
908
|
-
*/
|
|
909
|
-
reply_to?: MessageSendParams.ReplyTo;
|
|
910
|
-
/**
|
|
911
|
-
* Optional. Identifies the seat (user) sending the message so the message is
|
|
912
|
-
* attributed to a specific rep. Accepts either the seat UUID or the Firebase Auth
|
|
913
|
-
* subject. When provided, `sender_email` is auto-populated on the message record
|
|
914
|
-
* and webhook payloads. Returns 400 if the seat is not found.
|
|
915
|
-
*/
|
|
916
|
-
seat_id?: string;
|
|
917
|
-
/**
|
|
918
|
-
* The iMessage expressive message style
|
|
919
|
-
*/
|
|
920
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
921
|
-
/**
|
|
922
|
-
* Webhook URL for message status updates
|
|
923
|
-
*/
|
|
924
|
-
status_callback?: string;
|
|
925
|
-
}
|
|
926
|
-
export declare namespace MessageSendParams {
|
|
927
|
-
/**
|
|
928
|
-
* A Sendblue App Card rendered with Apple's Messages framework. App Cards require
|
|
929
|
-
* a V2 Mac line and an iMessage-capable recipient; they never fall back to SMS.
|
|
930
|
-
* The URL is delivered to the identified Messages extension when the recipient
|
|
931
|
-
* taps the card. An initial App Card may include `reply_to` to create an inline
|
|
932
|
-
* reply. Later state changes use the update endpoint, which sends a new Apple
|
|
933
|
-
* message in the same App Card session. The feature is unavailable on the free
|
|
934
|
-
* plan.
|
|
935
|
-
*/
|
|
936
|
-
interface AppCard {
|
|
937
|
-
appName: string;
|
|
938
|
-
extensionBundleId: string;
|
|
939
|
-
/**
|
|
940
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
941
|
-
*/
|
|
942
|
-
layout: AppCard.Layout;
|
|
943
|
-
teamId: string;
|
|
944
|
-
/**
|
|
945
|
-
* URL delivered to the iMessage extension on tap. HTTPS URLs are limited to 2048
|
|
946
|
-
* characters; data URLs carrying inline app state are limited to 16384.
|
|
947
|
-
*/
|
|
948
|
-
url: string;
|
|
949
|
-
/**
|
|
950
|
-
* Optional numeric App Store ID for recipients without the extension.
|
|
951
|
-
*/
|
|
952
|
-
appStoreId?: number;
|
|
953
|
-
/**
|
|
954
|
-
* Fallback text for notifications and surfaces that cannot render the card.
|
|
955
|
-
*/
|
|
956
|
-
fallbackText?: string;
|
|
957
|
-
/**
|
|
958
|
-
* Use Apple's live layout when the extension is installed; false always sends the
|
|
959
|
-
* static template layout.
|
|
960
|
-
*/
|
|
961
|
-
interactive?: boolean;
|
|
962
|
-
/**
|
|
963
|
-
* Optional caller-supplied App Card session UUID. Generated automatically when
|
|
964
|
-
* omitted.
|
|
965
|
-
*/
|
|
966
|
-
sessionIdentifier?: string;
|
|
967
|
-
}
|
|
968
|
-
namespace AppCard {
|
|
969
|
-
/**
|
|
970
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
971
|
-
*/
|
|
972
|
-
interface Layout {
|
|
973
|
-
caption?: string;
|
|
974
|
-
/**
|
|
975
|
-
* Secondary text overlaid on the preview image. Requires imageUrl.
|
|
976
|
-
*/
|
|
977
|
-
imageSubtitle?: string;
|
|
978
|
-
/**
|
|
979
|
-
* Text overlaid on the preview image. Requires imageUrl.
|
|
980
|
-
*/
|
|
981
|
-
imageTitle?: string;
|
|
982
|
-
/**
|
|
983
|
-
* HTTPS preview image fetched by the worker and sent as a hidden card attachment.
|
|
984
|
-
* JPEG, PNG, HEIC, HEIF, and WebP are supported up to 10 MB.
|
|
985
|
-
*/
|
|
986
|
-
imageUrl?: string;
|
|
987
|
-
subcaption?: string;
|
|
988
|
-
/**
|
|
989
|
-
* Fallback text used in notifications and non-rendering surfaces.
|
|
990
|
-
*/
|
|
991
|
-
summary?: string;
|
|
992
|
-
trailingCaption?: string;
|
|
993
|
-
trailingSubcaption?: string;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
/**
|
|
997
|
-
* Optional inline-reply target. This may be combined with `app_card`; the
|
|
998
|
-
* resulting App Card is sent as an inline reply to the target.
|
|
999
|
-
*/
|
|
1000
|
-
interface ReplyTo {
|
|
1001
|
-
/**
|
|
1002
|
-
* Public handle of the immediate parent message
|
|
1003
|
-
*/
|
|
1004
|
-
message_handle: string;
|
|
1005
|
-
/**
|
|
1006
|
-
* Advanced override for a known part of a multipart target. Omit this in normal
|
|
1007
|
-
* reply requests and never guess it; requests default to 0. When replying to an
|
|
1008
|
-
* attachment represented by its own webhook, use that webhook's `message_handle`
|
|
1009
|
-
* and omit `part_index` so Sendblue can use the stored authoritative part.
|
|
1010
|
-
* Responses omit it when no authoritative immediate-parent part is available.
|
|
1011
|
-
*/
|
|
1012
|
-
part_index?: number;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
export interface MessageUpdateAppCardParams {
|
|
1016
|
-
/**
|
|
1017
|
-
* Replacement fallback text for notifications and non-rendering surfaces.
|
|
1018
|
-
*/
|
|
1019
|
-
fallback_text?: string;
|
|
1020
|
-
/**
|
|
1021
|
-
* Reusing this key for the same App Card target returns the original update
|
|
1022
|
-
* instead of sending again.
|
|
1023
|
-
*/
|
|
1024
|
-
idempotency_key?: string;
|
|
1025
|
-
interactive?: boolean;
|
|
1026
|
-
/**
|
|
1027
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
1028
|
-
*/
|
|
1029
|
-
layout?: MessageUpdateAppCardParams.Layout;
|
|
1030
|
-
/**
|
|
1031
|
-
* The iMessage expressive message style for this update.
|
|
1032
|
-
*/
|
|
1033
|
-
send_style?: 'celebration' | 'shooting_star' | 'fireworks' | 'lasers' | 'love' | 'confetti' | 'balloons' | 'spotlight' | 'echo' | 'invisible' | 'gentle' | 'loud' | 'slam';
|
|
1034
|
-
url?: string;
|
|
1035
|
-
}
|
|
1036
|
-
export declare namespace MessageUpdateAppCardParams {
|
|
1037
|
-
/**
|
|
1038
|
-
* Visible card fields mirroring Apple's MSMessageTemplateLayout.
|
|
1039
|
-
*/
|
|
1040
|
-
interface Layout {
|
|
1041
|
-
caption?: string;
|
|
1042
|
-
/**
|
|
1043
|
-
* Secondary text overlaid on the preview image. Requires imageUrl.
|
|
1044
|
-
*/
|
|
1045
|
-
imageSubtitle?: string;
|
|
1046
|
-
/**
|
|
1047
|
-
* Text overlaid on the preview image. Requires imageUrl.
|
|
1048
|
-
*/
|
|
1049
|
-
imageTitle?: string;
|
|
1050
|
-
/**
|
|
1051
|
-
* HTTPS preview image fetched by the worker and sent as a hidden card attachment.
|
|
1052
|
-
* JPEG, PNG, HEIC, HEIF, and WebP are supported up to 10 MB.
|
|
1053
|
-
*/
|
|
1054
|
-
imageUrl?: string;
|
|
1055
|
-
subcaption?: string;
|
|
1056
|
-
/**
|
|
1057
|
-
* Fallback text used in notifications and non-rendering surfaces.
|
|
1058
|
-
*/
|
|
1059
|
-
summary?: string;
|
|
1060
|
-
trailingCaption?: string;
|
|
1061
|
-
trailingSubcaption?: string;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
export declare namespace Messages {
|
|
1065
|
-
export { type MessageContent as MessageContent, type MessageResponse as MessageResponse, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, type MessageGetStatusParams as MessageGetStatusParams, type MessageSendParams as MessageSendParams, type MessageUpdateAppCardParams as MessageUpdateAppCardParams, };
|
|
1066
|
-
}
|
|
1
|
+
export * from "./messages/index.js";
|
|
1067
2
|
//# sourceMappingURL=messages.d.ts.map
|