sendblue 3.10.1 → 3.12.0
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 +41 -0
- package/README.md +7 -7
- package/client.d.mts +46 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +46 -7
- package/client.d.ts.map +1 -1
- package/client.js +54 -6
- package/client.js.map +1 -1
- package/client.mjs +54 -6
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +263 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +258 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +11 -1
- package/resources/auth/auth.d.mts +10 -0
- package/resources/auth/auth.d.mts.map +1 -0
- package/resources/auth/auth.d.ts +10 -0
- package/resources/auth/auth.d.ts.map +1 -0
- package/resources/auth/auth.js +17 -0
- package/resources/auth/auth.js.map +1 -0
- package/resources/auth/auth.mjs +12 -0
- package/resources/auth/auth.mjs.map +1 -0
- package/resources/auth/index.d.mts +3 -0
- package/resources/auth/index.d.mts.map +1 -0
- package/resources/auth/index.d.ts +3 -0
- package/resources/auth/index.d.ts.map +1 -0
- package/resources/auth/index.js +9 -0
- package/resources/auth/index.js.map +1 -0
- package/resources/auth/index.mjs +4 -0
- package/resources/auth/index.mjs.map +1 -0
- package/resources/auth/tokens.d.mts +77 -0
- package/resources/auth/tokens.d.mts.map +1 -0
- package/resources/auth/tokens.d.ts +77 -0
- package/resources/auth/tokens.d.ts.map +1 -0
- package/resources/auth/tokens.js +51 -0
- package/resources/auth/tokens.js.map +1 -0
- package/resources/auth/tokens.mjs +47 -0
- package/resources/auth/tokens.mjs.map +1 -0
- package/resources/auth.d.mts +2 -0
- package/resources/auth.d.mts.map +1 -0
- package/resources/auth.d.ts +2 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +6 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +3 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +8 -0
- package/resources/contacts/contacts.d.mts.map +1 -1
- package/resources/contacts/contacts.d.ts +8 -0
- package/resources/contacts/contacts.d.ts.map +1 -1
- package/resources/contacts/contacts.js.map +1 -1
- package/resources/contacts/contacts.mjs.map +1 -1
- package/resources/events.d.mts +45 -0
- package/resources/events.d.mts.map +1 -0
- package/resources/events.d.ts +45 -0
- package/resources/events.d.ts.map +1 -0
- package/resources/events.js +37 -0
- package/resources/events.js.map +1 -0
- package/resources/events.mjs +33 -0
- package/resources/events.mjs.map +1 -0
- package/resources/groups.d.mts +25 -0
- package/resources/groups.d.mts.map +1 -1
- package/resources/groups.d.ts +25 -0
- package/resources/groups.d.ts.map +1 -1
- package/resources/index.d.mts +8 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -0
- package/resources/index.mjs.map +1 -1
- package/resources/lines/call-forwarding.d.mts +3 -0
- package/resources/lines/call-forwarding.d.mts.map +1 -1
- package/resources/lines/call-forwarding.d.ts +3 -0
- package/resources/lines/call-forwarding.d.ts.map +1 -1
- package/resources/lines/call-forwarding.js +3 -0
- package/resources/lines/call-forwarding.js.map +1 -1
- package/resources/lines/call-forwarding.mjs +3 -0
- package/resources/lines/call-forwarding.mjs.map +1 -1
- package/resources/lines/index.d.mts +1 -1
- package/resources/lines/index.d.mts.map +1 -1
- package/resources/lines/index.d.ts +1 -1
- package/resources/lines/index.d.ts.map +1 -1
- package/resources/lines/index.js.map +1 -1
- package/resources/lines/index.mjs.map +1 -1
- package/resources/lines/lines.d.mts +30 -0
- package/resources/lines/lines.d.mts.map +1 -1
- package/resources/lines/lines.d.ts +30 -0
- package/resources/lines/lines.d.ts.map +1 -1
- package/resources/lines/lines.js +15 -0
- package/resources/lines/lines.js.map +1 -1
- package/resources/lines/lines.mjs +15 -0
- package/resources/lines/lines.mjs.map +1 -1
- package/resources/location.d.mts +156 -0
- package/resources/location.d.mts.map +1 -0
- package/resources/location.d.ts +156 -0
- package/resources/location.d.ts.map +1 -0
- package/resources/location.js +57 -0
- package/resources/location.js.map +1 -0
- package/resources/location.mjs +53 -0
- package/resources/location.mjs.map +1 -0
- package/resources/messages.d.mts +507 -9
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +507 -9
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +16 -2
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +16 -2
- package/resources/messages.mjs.map +1 -1
- package/resources/request-location.d.mts +54 -0
- package/resources/request-location.d.mts.map +1 -0
- package/resources/request-location.d.ts +54 -0
- package/resources/request-location.d.ts.map +1 -0
- package/resources/request-location.js +30 -0
- package/resources/request-location.js.map +1 -0
- package/resources/request-location.mjs +26 -0
- package/resources/request-location.mjs.map +1 -0
- package/resources/send-carousel.d.mts +67 -0
- package/resources/send-carousel.d.mts.map +1 -1
- package/resources/send-carousel.d.ts +67 -0
- package/resources/send-carousel.d.ts.map +1 -1
- package/resources/v2/groups.d.mts +82 -0
- package/resources/v2/groups.d.mts.map +1 -0
- package/resources/v2/groups.d.ts +82 -0
- package/resources/v2/groups.d.ts.map +1 -0
- package/resources/v2/groups.js +27 -0
- package/resources/v2/groups.js.map +1 -0
- package/resources/v2/groups.mjs +23 -0
- package/resources/v2/groups.mjs.map +1 -0
- package/resources/v2/index.d.mts +1 -0
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts +1 -0
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.js +3 -1
- package/resources/v2/index.js.map +1 -1
- package/resources/v2/index.mjs +1 -0
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/v2.d.mts +4 -0
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts +4 -0
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +4 -0
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +4 -0
- package/resources/v2/v2.mjs.map +1 -1
- package/resources/verified-contacts.d.mts +152 -0
- package/resources/verified-contacts.d.mts.map +1 -0
- package/resources/verified-contacts.d.ts +152 -0
- package/resources/verified-contacts.d.ts.map +1 -0
- package/resources/verified-contacts.js +56 -0
- package/resources/verified-contacts.js.map +1 -0
- package/resources/verified-contacts.mjs +52 -0
- package/resources/verified-contacts.mjs.map +1 -0
- package/resources/verify/index.d.mts +3 -0
- package/resources/verify/index.d.mts.map +1 -0
- package/resources/verify/index.d.ts +3 -0
- package/resources/verify/index.d.ts.map +1 -0
- package/resources/verify/index.js +9 -0
- package/resources/verify/index.js.map +1 -0
- package/resources/verify/index.mjs +4 -0
- package/resources/verify/index.mjs.map +1 -0
- package/resources/verify/verifications.d.mts +45 -0
- package/resources/verify/verifications.d.mts.map +1 -0
- package/resources/verify/verifications.d.ts +45 -0
- package/resources/verify/verifications.d.ts.map +1 -0
- package/resources/verify/verifications.js +19 -0
- package/resources/verify/verifications.js.map +1 -0
- package/resources/verify/verifications.mjs +15 -0
- package/resources/verify/verifications.mjs.map +1 -0
- package/resources/verify/verify.d.mts +10 -0
- package/resources/verify/verify.d.mts.map +1 -0
- package/resources/verify/verify.d.ts +10 -0
- package/resources/verify/verify.d.ts.map +1 -0
- package/resources/verify/verify.js +17 -0
- package/resources/verify/verify.js.map +1 -0
- package/resources/verify/verify.mjs +12 -0
- package/resources/verify/verify.mjs.map +1 -0
- package/resources/verify.d.mts +2 -0
- package/resources/verify.d.mts.map +1 -0
- package/resources/verify.d.ts +2 -0
- package/resources/verify.d.ts.map +1 -0
- package/resources/verify.js +6 -0
- package/resources/verify.js.map +1 -0
- package/resources/verify.mjs +3 -0
- package/resources/verify.mjs.map +1 -0
- package/resources/webhooks.d.mts +26 -10
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +26 -10
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +13 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +13 -2
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +116 -15
- package/src/core/streaming.ts +319 -0
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/resources/auth/auth.ts +19 -0
- package/src/resources/auth/index.ts +4 -0
- package/src/resources/auth/tokens.ts +101 -0
- package/src/resources/auth.ts +3 -0
- package/src/resources/contacts/contacts.ts +10 -0
- package/src/resources/events.ts +75 -0
- package/src/resources/groups.ts +28 -0
- package/src/resources/index.ts +26 -1
- package/src/resources/lines/call-forwarding.ts +3 -0
- package/src/resources/lines/index.ts +1 -1
- package/src/resources/lines/lines.ts +44 -0
- package/src/resources/location.ts +237 -0
- package/src/resources/messages.ts +634 -9
- package/src/resources/request-location.ts +72 -0
- package/src/resources/send-carousel.ts +76 -0
- package/src/resources/v2/groups.ts +106 -0
- package/src/resources/v2/index.ts +1 -0
- package/src/resources/v2/v2.ts +6 -0
- package/src/resources/verified-contacts.ts +204 -0
- package/src/resources/verify/index.ts +9 -0
- package/src/resources/verify/verifications.ts +75 -0
- package/src/resources/verify/verify.ts +25 -0
- package/src/resources/verify.ts +3 -0
- package/src/resources/webhooks.ts +27 -10
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +3 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +3 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +3 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/messages.d.mts
CHANGED
|
@@ -55,18 +55,30 @@ export declare class Messages extends APIResource {
|
|
|
55
55
|
*/
|
|
56
56
|
getStatus(query: MessageGetStatusParams, options?: RequestOptions): APIPromise<MessageResponse>;
|
|
57
57
|
/**
|
|
58
|
-
* Send an iMessage, SMS, or
|
|
58
|
+
* Send an iMessage, SMS, MMS, or Sendblue App Card to a single recipient
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* ```ts
|
|
62
62
|
* const messageResponse = await client.messages.send({
|
|
63
|
-
* content: 'Hello, World!',
|
|
64
63
|
* from_number: '+19998887777',
|
|
65
64
|
* number: '+19998887777',
|
|
66
65
|
* });
|
|
67
66
|
* ```
|
|
68
67
|
*/
|
|
69
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>;
|
|
70
82
|
}
|
|
71
83
|
export interface MessageContent {
|
|
72
84
|
/**
|
|
@@ -105,6 +117,11 @@ export interface MessageContent {
|
|
|
105
117
|
* Unique message identifier
|
|
106
118
|
*/
|
|
107
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;
|
|
108
125
|
/**
|
|
109
126
|
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
110
127
|
* send, or for dashboard-originated group messages.
|
|
@@ -117,16 +134,57 @@ export interface MessageContent {
|
|
|
117
134
|
*/
|
|
118
135
|
sender_email?: string | null;
|
|
119
136
|
status?: 'QUEUED' | 'SENT' | 'DELIVERED' | 'ERROR' | 'RECEIVED';
|
|
137
|
+
/**
|
|
138
|
+
* Message that originated an iMessage inline-reply thread.
|
|
139
|
+
*/
|
|
140
|
+
thread_originator?: MessageContent.ThreadOriginator;
|
|
120
141
|
/**
|
|
121
142
|
* Recipient phone number
|
|
122
143
|
*/
|
|
123
144
|
to_number?: string;
|
|
124
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
|
+
}
|
|
125
179
|
export interface MessageResponse {
|
|
126
180
|
/**
|
|
127
181
|
* Email of the account that sent the message
|
|
128
182
|
*/
|
|
129
183
|
account_email?: string;
|
|
184
|
+
/**
|
|
185
|
+
* App Card data sent or received with this message.
|
|
186
|
+
*/
|
|
187
|
+
app_card?: MessageResponse.AppCard | MessageResponse.InboundAppCard;
|
|
130
188
|
/**
|
|
131
189
|
* Message content
|
|
132
190
|
*/
|
|
@@ -155,6 +213,10 @@ export interface MessageResponse {
|
|
|
155
213
|
* Whether this is an outbound message
|
|
156
214
|
*/
|
|
157
215
|
is_outbound?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Decoded Find My location share coordinates.
|
|
218
|
+
*/
|
|
219
|
+
location?: MessageResponse.Location;
|
|
158
220
|
/**
|
|
159
221
|
* URL of attached media
|
|
160
222
|
*/
|
|
@@ -163,10 +225,16 @@ export interface MessageResponse {
|
|
|
163
225
|
* Unique identifier for tracking the message
|
|
164
226
|
*/
|
|
165
227
|
message_handle?: string;
|
|
228
|
+
message_type?: 'message' | 'group' | 'location';
|
|
166
229
|
/**
|
|
167
230
|
* Recipient phone number
|
|
168
231
|
*/
|
|
169
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;
|
|
170
238
|
/**
|
|
171
239
|
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
172
240
|
* send, or for dashboard-originated group messages.
|
|
@@ -182,6 +250,151 @@ export interface MessageResponse {
|
|
|
182
250
|
*/
|
|
183
251
|
sender_email?: string | null;
|
|
184
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
|
+
}
|
|
185
398
|
}
|
|
186
399
|
export interface MessageRetrieveResponse {
|
|
187
400
|
data?: MessageRetrieveResponse.Data;
|
|
@@ -237,6 +450,10 @@ export declare namespace MessageRetrieveResponse {
|
|
|
237
450
|
* Whether this is an outbound message
|
|
238
451
|
*/
|
|
239
452
|
is_outbound?: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* Decoded Find My location share coordinates.
|
|
455
|
+
*/
|
|
456
|
+
location?: Data.Location;
|
|
240
457
|
/**
|
|
241
458
|
* URL of attached media
|
|
242
459
|
*/
|
|
@@ -245,7 +462,7 @@ export declare namespace MessageRetrieveResponse {
|
|
|
245
462
|
* Unique message identifier
|
|
246
463
|
*/
|
|
247
464
|
message_handle?: string;
|
|
248
|
-
message_type?: 'message' | 'group';
|
|
465
|
+
message_type?: 'message' | 'group' | 'location';
|
|
249
466
|
/**
|
|
250
467
|
* Primary phone number (to_number for outbound, from_number for inbound)
|
|
251
468
|
*/
|
|
@@ -262,6 +479,11 @@ export declare namespace MessageRetrieveResponse {
|
|
|
262
479
|
* Account plan used for this message
|
|
263
480
|
*/
|
|
264
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;
|
|
265
487
|
/**
|
|
266
488
|
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
267
489
|
* send, or for dashboard-originated group messages.
|
|
@@ -285,6 +507,10 @@ export declare namespace MessageRetrieveResponse {
|
|
|
285
507
|
*/
|
|
286
508
|
service?: 'iMessage' | 'SMS' | 'RCS';
|
|
287
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;
|
|
288
514
|
/**
|
|
289
515
|
* Recipient phone number
|
|
290
516
|
*/
|
|
@@ -294,6 +520,59 @@ export declare namespace MessageRetrieveResponse {
|
|
|
294
520
|
*/
|
|
295
521
|
was_downgraded?: boolean;
|
|
296
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
|
+
}
|
|
297
576
|
}
|
|
298
577
|
export interface MessageListResponse {
|
|
299
578
|
data?: Array<MessageListResponse.Data>;
|
|
@@ -350,6 +629,10 @@ export declare namespace MessageListResponse {
|
|
|
350
629
|
* Whether this is an outbound message
|
|
351
630
|
*/
|
|
352
631
|
is_outbound?: boolean;
|
|
632
|
+
/**
|
|
633
|
+
* Decoded Find My location share coordinates.
|
|
634
|
+
*/
|
|
635
|
+
location?: Data.Location;
|
|
353
636
|
/**
|
|
354
637
|
* URL of attached media
|
|
355
638
|
*/
|
|
@@ -358,7 +641,7 @@ export declare namespace MessageListResponse {
|
|
|
358
641
|
* Unique message identifier
|
|
359
642
|
*/
|
|
360
643
|
message_handle?: string;
|
|
361
|
-
message_type?: 'message' | 'group';
|
|
644
|
+
message_type?: 'message' | 'group' | 'location';
|
|
362
645
|
/**
|
|
363
646
|
* Primary phone number (to_number for outbound, from_number for inbound)
|
|
364
647
|
*/
|
|
@@ -375,6 +658,11 @@ export declare namespace MessageListResponse {
|
|
|
375
658
|
* Account plan used for this message
|
|
376
659
|
*/
|
|
377
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;
|
|
378
666
|
/**
|
|
379
667
|
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
380
668
|
* send, or for dashboard-originated group messages.
|
|
@@ -398,6 +686,10 @@ export declare namespace MessageListResponse {
|
|
|
398
686
|
*/
|
|
399
687
|
service?: 'iMessage' | 'SMS' | 'RCS';
|
|
400
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;
|
|
401
693
|
/**
|
|
402
694
|
* Recipient phone number
|
|
403
695
|
*/
|
|
@@ -407,6 +699,59 @@ export declare namespace MessageListResponse {
|
|
|
407
699
|
*/
|
|
408
700
|
was_downgraded?: boolean;
|
|
409
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
|
+
}
|
|
410
755
|
interface Pagination {
|
|
411
756
|
/**
|
|
412
757
|
* Whether there are more messages available
|
|
@@ -529,10 +874,6 @@ export interface MessageGetStatusParams {
|
|
|
529
874
|
handle: string;
|
|
530
875
|
}
|
|
531
876
|
export interface MessageSendParams {
|
|
532
|
-
/**
|
|
533
|
-
* Message text content
|
|
534
|
-
*/
|
|
535
|
-
content: string;
|
|
536
877
|
/**
|
|
537
878
|
* **REQUIRED** - The phone number to send from. Must be one of your registered
|
|
538
879
|
* Sendblue phone numbers in E.164 format. Without this parameter, the message will
|
|
@@ -543,10 +884,29 @@ export interface MessageSendParams {
|
|
|
543
884
|
* Recipient phone number in E.164 format
|
|
544
885
|
*/
|
|
545
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;
|
|
546
901
|
/**
|
|
547
902
|
* URL of media file to send (images, videos, etc.)
|
|
548
903
|
*/
|
|
549
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;
|
|
550
910
|
/**
|
|
551
911
|
* Optional. Identifies the seat (user) sending the message so the message is
|
|
552
912
|
* attributed to a specific rep. Accepts either the seat UUID or the Firebase Auth
|
|
@@ -563,7 +923,145 @@ export interface MessageSendParams {
|
|
|
563
923
|
*/
|
|
564
924
|
status_callback?: string;
|
|
565
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
|
+
}
|
|
566
1064
|
export declare namespace Messages {
|
|
567
|
-
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, };
|
|
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, };
|
|
568
1066
|
}
|
|
569
1067
|
//# sourceMappingURL=messages.d.mts.map
|