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