@inkbox/sdk 0.4.6 → 0.4.8

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 (60) hide show
  1. package/README.md +84 -12
  2. package/dist/_http.d.ts +12 -0
  3. package/dist/_http.d.ts.map +1 -1
  4. package/dist/_http.js +23 -2
  5. package/dist/_http.js.map +1 -1
  6. package/dist/agent_identity.d.ts +132 -2
  7. package/dist/agent_identity.d.ts.map +1 -1
  8. package/dist/agent_identity.js +149 -1
  9. package/dist/agent_identity.js.map +1 -1
  10. package/dist/identities/resources/identities.d.ts +11 -1
  11. package/dist/identities/resources/identities.d.ts.map +1 -1
  12. package/dist/identities/resources/identities.js +14 -1
  13. package/dist/identities/resources/identities.js.map +1 -1
  14. package/dist/identities/types.d.ts +15 -0
  15. package/dist/identities/types.d.ts.map +1 -1
  16. package/dist/identities/types.js +2 -0
  17. package/dist/identities/types.js.map +1 -1
  18. package/dist/imessage/resources/contactRules.d.ts +55 -0
  19. package/dist/imessage/resources/contactRules.d.ts.map +1 -0
  20. package/dist/imessage/resources/contactRules.js +85 -0
  21. package/dist/imessage/resources/contactRules.js.map +1 -0
  22. package/dist/imessage/resources/imessages.d.ts +168 -0
  23. package/dist/imessage/resources/imessages.d.ts.map +1 -0
  24. package/dist/imessage/resources/imessages.js +238 -0
  25. package/dist/imessage/resources/imessages.js.map +1 -0
  26. package/dist/imessage/types.d.ts +335 -0
  27. package/dist/imessage/types.d.ts.map +1 -0
  28. package/dist/imessage/types.js +209 -0
  29. package/dist/imessage/types.js.map +1 -0
  30. package/dist/index.d.ts +5 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/inkbox.d.ts +16 -4
  35. package/dist/inkbox.d.ts.map +1 -1
  36. package/dist/inkbox.js +21 -4
  37. package/dist/inkbox.js.map +1 -1
  38. package/dist/tunnels/client/_runtime.d.ts +45 -10
  39. package/dist/tunnels/client/_runtime.d.ts.map +1 -1
  40. package/dist/tunnels/client/_runtime.js +423 -183
  41. package/dist/tunnels/client/_runtime.js.map +1 -1
  42. package/dist/tunnels/client/_ws.d.ts +12 -0
  43. package/dist/tunnels/client/_ws.d.ts.map +1 -1
  44. package/dist/tunnels/client/_ws.js +26 -1
  45. package/dist/tunnels/client/_ws.js.map +1 -1
  46. package/dist/tunnels/client/_ws_url_edge_bridge.d.ts +1 -1
  47. package/dist/tunnels/client/_ws_url_edge_bridge.d.ts.map +1 -1
  48. package/dist/tunnels/client/_ws_url_edge_bridge.js +17 -2
  49. package/dist/tunnels/client/_ws_url_edge_bridge.js.map +1 -1
  50. package/dist/tunnels/client/index.d.ts +1 -1
  51. package/dist/tunnels/client/index.d.ts.map +1 -1
  52. package/dist/tunnels/client/index.js +1 -1
  53. package/dist/tunnels/client/index.js.map +1 -1
  54. package/dist/webhooks/subscriptions.d.ts +18 -9
  55. package/dist/webhooks/subscriptions.d.ts.map +1 -1
  56. package/dist/webhooks/subscriptions.js +38 -23
  57. package/dist/webhooks/subscriptions.js.map +1 -1
  58. package/dist/webhooks/types.d.ts +101 -0
  59. package/dist/webhooks/types.d.ts.map +1 -1
  60. package/package.json +3 -3
@@ -0,0 +1,238 @@
1
+ /**
2
+ * inkbox-imessage/resources/imessages.ts
3
+ *
4
+ * iMessage operations: send, list, conversations, reactions, read
5
+ * receipts, typing indicators, media upload.
6
+ *
7
+ * Unlike SMS, iMessage is not scoped to an org-owned phone number.
8
+ * Recipients are connected to an agent identity over a shared pool
9
+ * line by triage, so every method here keys off `conversationId` /
10
+ * `agentIdentityId` rather than a `phoneNumberId`.
11
+ */
12
+ import { parseIMessage, parseIMessageAssignment, parseIMessageConversation, parseIMessageConversationSummary, parseIMessageReaction, parseIMessageTriageNumber, } from "../types.js";
13
+ export class IMessagesResource {
14
+ http;
15
+ constructor(http) {
16
+ this.http = http;
17
+ }
18
+ /**
19
+ * Return the active triage line and the connect command.
20
+ *
21
+ * Recipients text the returned `connectCommand` (e.g.
22
+ * `connect @your-handle`) to the triage `number` to get connected to
23
+ * an agent identity. Resolve this at runtime instead of hardcoding
24
+ * the number — the line can change.
25
+ *
26
+ * @throws {InkboxAPIError} 404 when no triage line is active.
27
+ */
28
+ async getTriageNumber() {
29
+ const data = await this.http.get("/triage-number");
30
+ return parseIMessageTriageNumber(data);
31
+ }
32
+ /**
33
+ * Send an outbound iMessage through an existing assignment.
34
+ *
35
+ * Sends only work toward recipients that triage has already connected
36
+ * to the agent identity — there is no cold outreach over iMessage.
37
+ * Inbound replies and reactions arrive via identity-owned webhook
38
+ * subscriptions (`inkbox.webhooks.subscriptions.create({
39
+ * agentIdentityId, url, eventTypes: ["imessage.received", ...] })`).
40
+ *
41
+ * @param options.to - E.164 recipient number. Mutually exclusive with
42
+ * `conversationId`.
43
+ * @param options.conversationId - Existing conversation UUID to reply into.
44
+ * @param options.text - Message body.
45
+ * @param options.mediaUrls - Media URLs (at most one). Use
46
+ * {@link uploadMedia} to turn raw bytes into a sendable URL first.
47
+ * @param options.sendStyle - Optional expressive send style.
48
+ * @param options.agentIdentityId - Identity to send as. Required for
49
+ * org-wide API keys when sending by `to`; ignored for
50
+ * identity-scoped keys (the key's identity wins).
51
+ *
52
+ * @throws {InkboxAPIError} 400 when the identity is not
53
+ * iMessage-enabled; 403 when the recipient is blocked by a contact
54
+ * rule.
55
+ */
56
+ async send(options) {
57
+ const body = {};
58
+ if (options.to != null) {
59
+ body.to = options.to;
60
+ }
61
+ if (options.conversationId != null) {
62
+ body.conversation_id = options.conversationId;
63
+ }
64
+ if (options.text != null) {
65
+ body.text = options.text;
66
+ }
67
+ if (options.mediaUrls != null) {
68
+ body.media_urls = options.mediaUrls;
69
+ }
70
+ if (options.sendStyle != null) {
71
+ body.send_style = options.sendStyle;
72
+ }
73
+ const params = {};
74
+ if (options.agentIdentityId != null) {
75
+ params["agent_identity_id"] = options.agentIdentityId;
76
+ }
77
+ const data = await this.http.post("/messages", body, { params });
78
+ return parseIMessage(data.message);
79
+ }
80
+ /**
81
+ * List iMessages visible to the caller, newest first.
82
+ *
83
+ * Identity-scoped API keys never see contact-rule-blocked rows
84
+ * regardless of `isBlocked` (filtered server-side). Admin/JWT callers
85
+ * see everything by default.
86
+ *
87
+ * @param options.agentIdentityId - Narrow to one agent identity.
88
+ * Ignored for identity-scoped keys (always their own identity).
89
+ * @param options.conversationId - Narrow to one conversation.
90
+ * @param options.limit - Max results (1–200). Defaults to 50.
91
+ * @param options.offset - Pagination offset. Defaults to 0.
92
+ * @param options.isRead - Filter by read state.
93
+ * @param options.isBlocked - Tri-state filter. `true` for only blocked,
94
+ * `false` for only non-blocked, omit for all.
95
+ */
96
+ async list(options) {
97
+ const params = {
98
+ limit: options?.limit ?? 50,
99
+ offset: options?.offset ?? 0,
100
+ };
101
+ if (options?.agentIdentityId !== undefined) {
102
+ params["agent_identity_id"] = options.agentIdentityId;
103
+ }
104
+ if (options?.conversationId !== undefined) {
105
+ params["conversation_id"] = options.conversationId;
106
+ }
107
+ if (options?.isRead !== undefined) {
108
+ params["is_read"] = options.isRead;
109
+ }
110
+ if (options?.isBlocked !== undefined) {
111
+ params["is_blocked"] = options.isBlocked;
112
+ }
113
+ const data = await this.http.get("/messages", params);
114
+ return data.map(parseIMessage);
115
+ }
116
+ /**
117
+ * List active iMessage connections, newest first.
118
+ *
119
+ * One row per recipient currently connected to an agent identity
120
+ * through triage. Released connections are not returned.
121
+ *
122
+ * @param options.agentIdentityId - Narrow to one agent identity.
123
+ * Ignored for identity-scoped keys (always their own identity).
124
+ * @param options.limit - Max results (1–200). Defaults to 50.
125
+ * @param options.offset - Pagination offset. Defaults to 0.
126
+ */
127
+ async listAssignments(options) {
128
+ const params = {
129
+ limit: options?.limit ?? 50,
130
+ offset: options?.offset ?? 0,
131
+ };
132
+ if (options?.agentIdentityId !== undefined) {
133
+ params["agent_identity_id"] = options.agentIdentityId;
134
+ }
135
+ const data = await this.http.get("/assignments", params);
136
+ return data.map(parseIMessageAssignment);
137
+ }
138
+ /**
139
+ * List iMessage conversations with latest-message preview.
140
+ *
141
+ * @param options.agentIdentityId - Narrow to one agent identity.
142
+ * Ignored for identity-scoped keys (always their own identity).
143
+ * @param options.limit - Max results (1–200). Defaults to 50.
144
+ * @param options.offset - Pagination offset. Defaults to 0.
145
+ * @param options.isBlocked - Tri-state filter applied to the
146
+ * underlying messages. `true` for only blocked, `false` for only
147
+ * non-blocked, omit for all.
148
+ */
149
+ async listConversations(options) {
150
+ const params = {
151
+ limit: options?.limit ?? 50,
152
+ offset: options?.offset ?? 0,
153
+ };
154
+ if (options?.agentIdentityId !== undefined) {
155
+ params["agent_identity_id"] = options.agentIdentityId;
156
+ }
157
+ if (options?.isBlocked !== undefined) {
158
+ params["is_blocked"] = options.isBlocked;
159
+ }
160
+ const data = await this.http.get("/conversations", params);
161
+ return data.map(parseIMessageConversationSummary);
162
+ }
163
+ /**
164
+ * Get one iMessage conversation by ID.
165
+ *
166
+ * @param conversationId - UUID of the conversation.
167
+ * @param options.agentIdentityId - Optional identity assertion; 404s
168
+ * when the conversation belongs to a different identity.
169
+ */
170
+ async getConversation(conversationId, options) {
171
+ const params = {};
172
+ if (options?.agentIdentityId !== undefined) {
173
+ params["agent_identity_id"] = options.agentIdentityId;
174
+ }
175
+ const data = await this.http.get(`/conversations/${conversationId}`, params);
176
+ return parseIMessageConversation(data);
177
+ }
178
+ /**
179
+ * Send a tapback reaction to a message.
180
+ *
181
+ * @param options.messageId - UUID of the message being reacted to.
182
+ * @param options.reaction - Tapback kind. Sends accept the classic
183
+ * six; `custom` is inbound-only and rejected with 422.
184
+ * @param options.partIndex - Part of a multi-part message to react to.
185
+ * Defaults to 0.
186
+ */
187
+ async sendReaction(options) {
188
+ const data = await this.http.post("/reactions", {
189
+ message_id: options.messageId,
190
+ reaction: options.reaction,
191
+ part_index: options.partIndex ?? 0,
192
+ });
193
+ return parseIMessageReaction(data);
194
+ }
195
+ /**
196
+ * Send a read receipt and mark inbound messages read locally.
197
+ *
198
+ * @param conversationId - UUID of the conversation.
199
+ * @returns Object with `conversationId` and `updatedCount`.
200
+ */
201
+ async markConversationRead(conversationId) {
202
+ const data = await this.http.post("/mark-read", { conversation_id: conversationId });
203
+ return {
204
+ conversationId: data.conversation_id,
205
+ updatedCount: data.updated_count,
206
+ };
207
+ }
208
+ /**
209
+ * Show a typing indicator to the conversation's recipient.
210
+ *
211
+ * @param conversationId - UUID of the conversation.
212
+ */
213
+ async sendTyping(conversationId) {
214
+ await this.http.post("/typing", { conversation_id: conversationId });
215
+ }
216
+ /**
217
+ * Upload media and get back a URL usable in `mediaUrls`.
218
+ *
219
+ * @param options.content - Raw file bytes (max 10 MiB).
220
+ * @param options.filename - Original filename, used for type inference.
221
+ * @param options.contentType - Optional MIME type; defaults
222
+ * server-side to `application/octet-stream`.
223
+ */
224
+ async uploadMedia(options) {
225
+ const data = await this.http.postMultipart("/media", {
226
+ fieldName: "file",
227
+ filename: options.filename,
228
+ content: options.content,
229
+ contentType: options.contentType ?? "application/octet-stream",
230
+ });
231
+ return {
232
+ mediaUrl: data.media_url,
233
+ contentType: data.content_type ?? null,
234
+ size: data.size ?? null,
235
+ };
236
+ }
237
+ }
238
+ //# sourceMappingURL=imessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imessages.js","sourceRoot":"","sources":["../../../src/imessage/resources/imessages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAiBL,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,gCAAgC,EAChC,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;;;;;;;OASG;IACH,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAA0B,gBAAgB,CAAC,CAAC;QAC5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AAU,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;SACnC,CAAC,CAAC;QACH,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,oBAAoB,CACxB,cAAsB;QAEtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAG9B,YAAY,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;QACtD,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,eAAe;YACpC,YAAY,EAAE,IAAI,CAAC,aAAa;SACjC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,cAAsB;QACrC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,OAIjB;QACC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAIvC,QAAQ,EAAE;YACX,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,0BAA0B;SAC/D,CAAC,CAAC;QACH,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,WAAW,EAAE,IAAI,CAAC,YAAY,IAAI,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;SACxB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,335 @@
1
+ /**
2
+ * inkbox-imessage/types.ts
3
+ *
4
+ * Types mirroring the Inkbox iMessage API response models.
5
+ *
6
+ * iMessage routes by assignment, not by a number the org owns: a
7
+ * recipient is connected to an agent identity over a shared pool line,
8
+ * and every agent-facing shape is keyed by `conversationId` /
9
+ * `remoteNumber`. The local pool number is never exposed.
10
+ */
11
+ import { ContactRuleStatus } from "../mail/types.js";
12
+ /** Transport a message actually went over (iMessage may downgrade). */
13
+ export declare enum IMessageService {
14
+ IMESSAGE = "imessage",
15
+ SMS = "sms",
16
+ RCS = "rcs"
17
+ }
18
+ /** Provider-facing delivery lifecycle for an iMessage. */
19
+ export declare enum IMessageDeliveryStatus {
20
+ REGISTERED = "registered",
21
+ PENDING = "pending",
22
+ QUEUED = "queued",
23
+ ACCEPTED = "accepted",
24
+ SENT = "sent",
25
+ DELIVERED = "delivered",
26
+ DECLINED = "declined",
27
+ ERROR = "error",
28
+ RECEIVED = "received"
29
+ }
30
+ /**
31
+ * Tapback reaction kinds.
32
+ *
33
+ * `CUSTOM` is inbound-only: recipients can react with any emoji
34
+ * (carried in `customEmoji`), but sends accept the classic six.
35
+ */
36
+ export declare enum IMessageReactionType {
37
+ LOVE = "love",
38
+ LIKE = "like",
39
+ DISLIKE = "dislike",
40
+ LAUGH = "laugh",
41
+ EMPHASIZE = "emphasize",
42
+ QUESTION = "question",
43
+ CUSTOM = "custom"
44
+ }
45
+ /** Expressive send style applied to an outbound iMessage. */
46
+ export declare enum IMessageSendStyle {
47
+ CELEBRATION = "celebration",
48
+ SHOOTING_STAR = "shooting_star",
49
+ FIREWORKS = "fireworks",
50
+ LASERS = "lasers",
51
+ LOVE = "love",
52
+ CONFETTI = "confetti",
53
+ BALLOONS = "balloons",
54
+ SPOTLIGHT = "spotlight",
55
+ ECHO = "echo",
56
+ INVISIBLE = "invisible",
57
+ GENTLE = "gentle",
58
+ LOUD = "loud",
59
+ SLAM = "slam"
60
+ }
61
+ /** Lifecycle of a recipient's triage-created connection to an agent. */
62
+ export declare enum IMessageAssignmentStatus {
63
+ ACTIVE = "active",
64
+ RELEASED = "released"
65
+ }
66
+ /** Whether a matching remote number is allowed through or blocked. */
67
+ export declare enum IMessageRuleAction {
68
+ ALLOW = "allow",
69
+ BLOCK = "block"
70
+ }
71
+ /** What an iMessage contact rule matches on. */
72
+ export declare enum IMessageRuleMatchType {
73
+ EXACT_NUMBER = "exact_number"
74
+ }
75
+ /** Media attachment on an iMessage. */
76
+ export interface IMessageMediaItem {
77
+ url: string;
78
+ contentType: string | null;
79
+ size: number | null;
80
+ }
81
+ /** Per-recipient outbound delivery state for an iMessage. */
82
+ export interface IMessageRecipient {
83
+ remoteNumber: string;
84
+ deliveryStatus: IMessageDeliveryStatus | null;
85
+ service: IMessageService | null;
86
+ errorCode: string | null;
87
+ errorMessage: string | null;
88
+ errorReason: string | null;
89
+ errorDetail: string | null;
90
+ sentAt: Date | null;
91
+ deliveredAt: Date | null;
92
+ failedAt: Date | null;
93
+ }
94
+ /** A live tapback attached to a message in read responses. */
95
+ export interface IMessageMessageReaction {
96
+ id: string;
97
+ /** "inbound" | "outbound" */
98
+ direction: string;
99
+ reaction: IMessageReactionType;
100
+ /** Literal emoji when `reaction` is "custom"; null for the classic six. */
101
+ customEmoji: string | null;
102
+ remoteNumber: string;
103
+ partIndex: number;
104
+ createdAt: Date;
105
+ }
106
+ /**
107
+ * An iMessage in an assignment-routed conversation.
108
+ *
109
+ * There is no local-number field: shared pool lines are hidden from
110
+ * agents, so messages are identified by `conversationId` and the
111
+ * counterparty `remoteNumber` only.
112
+ */
113
+ export interface IMessage {
114
+ id: string;
115
+ conversationId: string;
116
+ assignmentId: string;
117
+ /** "inbound" | "outbound" */
118
+ direction: string;
119
+ remoteNumber: string;
120
+ content: string | null;
121
+ /** "message" | "carousel" */
122
+ messageType: string;
123
+ service: IMessageService;
124
+ sendStyle: IMessageSendStyle | null;
125
+ media: IMessageMediaItem[] | null;
126
+ wasDowngraded: boolean | null;
127
+ status: IMessageDeliveryStatus | null;
128
+ errorCode: string | null;
129
+ errorMessage: string | null;
130
+ errorReason: string | null;
131
+ errorDetail: string | null;
132
+ isRead: boolean;
133
+ isBlocked: boolean;
134
+ recipients: IMessageRecipient[] | null;
135
+ /** Live (non-removed) tapbacks targeting this message, oldest first. */
136
+ reactions: IMessageMessageReaction[] | null;
137
+ createdAt: Date;
138
+ updatedAt: Date;
139
+ }
140
+ /**
141
+ * One assignment-scoped iMessage conversation.
142
+ *
143
+ * `assignmentStatus` reflects the current connection: non-active means
144
+ * the recipient is disconnected and the agent cannot reply until they
145
+ * reconnect through triage.
146
+ */
147
+ export interface IMessageConversation {
148
+ id: string;
149
+ assignmentId: string;
150
+ assignmentStatus: IMessageAssignmentStatus;
151
+ remoteNumber: string;
152
+ createdAt: Date;
153
+ updatedAt: Date;
154
+ }
155
+ /** Conversation list row with latest-message preview. */
156
+ export interface IMessageConversationSummary {
157
+ id: string;
158
+ assignmentId: string;
159
+ assignmentStatus: IMessageAssignmentStatus;
160
+ remoteNumber: string;
161
+ latestText: string | null;
162
+ latestMessageAt: Date | null;
163
+ latestDirection: string | null;
164
+ latestHasMedia: boolean;
165
+ unreadCount: number;
166
+ totalCount: number;
167
+ }
168
+ /** A tapback reaction on an iMessage. */
169
+ export interface IMessageReaction {
170
+ id: string;
171
+ conversationId: string;
172
+ assignmentId: string;
173
+ targetMessageId: string;
174
+ /** "inbound" | "outbound" */
175
+ direction: string;
176
+ reaction: IMessageReactionType;
177
+ /** Literal emoji when `reaction` is "custom"; null for the classic six. */
178
+ customEmoji: string | null;
179
+ remoteNumber: string;
180
+ partIndex: number;
181
+ createdAt: Date;
182
+ updatedAt: Date;
183
+ }
184
+ /** An active connection between one recipient and one agent identity. */
185
+ export interface IMessageAssignment {
186
+ id: string;
187
+ remoteNumber: string;
188
+ agentIdentityId: string;
189
+ organizationId: string;
190
+ status: IMessageAssignmentStatus;
191
+ releasedAt: Date | null;
192
+ createdAt: Date;
193
+ updatedAt: Date;
194
+ }
195
+ /** The active triage line and how recipients start a connection. */
196
+ export interface IMessageTriageNumber {
197
+ number: string;
198
+ connectCommand: string;
199
+ }
200
+ /** Result of marking a conversation's inbound messages read. */
201
+ export interface IMessageMarkReadResult {
202
+ conversationId: string;
203
+ updatedCount: number;
204
+ }
205
+ /** A reusable media URL returned by the iMessage media upload. */
206
+ export interface IMessageMediaUpload {
207
+ mediaUrl: string;
208
+ contentType: string | null;
209
+ size: number | null;
210
+ }
211
+ /** An allow/block rule scoped to an agent identity for iMessage. */
212
+ export interface IMessageContactRule {
213
+ id: string;
214
+ agentIdentityId: string;
215
+ action: IMessageRuleAction;
216
+ matchType: IMessageRuleMatchType;
217
+ matchTarget: string;
218
+ status: ContactRuleStatus;
219
+ createdAt: Date;
220
+ updatedAt: Date;
221
+ }
222
+ export interface RawIMessageMediaItem {
223
+ url: string;
224
+ content_type?: string | null;
225
+ size?: number | null;
226
+ }
227
+ export interface RawIMessageRecipient {
228
+ remote_number: string;
229
+ delivery_status?: string | null;
230
+ service?: string | null;
231
+ error_code?: string | null;
232
+ error_message?: string | null;
233
+ error_reason?: string | null;
234
+ error_detail?: string | null;
235
+ sent_at?: string | null;
236
+ delivered_at?: string | null;
237
+ failed_at?: string | null;
238
+ }
239
+ export interface RawIMessageMessageReaction {
240
+ id: string;
241
+ direction: string;
242
+ reaction: string;
243
+ custom_emoji?: string | null;
244
+ remote_number: string;
245
+ part_index?: number;
246
+ created_at: string;
247
+ }
248
+ export interface RawIMessage {
249
+ id: string;
250
+ conversation_id: string;
251
+ assignment_id: string;
252
+ direction: string;
253
+ remote_number: string;
254
+ content?: string | null;
255
+ message_type: string;
256
+ service: string;
257
+ send_style?: string | null;
258
+ media?: RawIMessageMediaItem[] | null;
259
+ was_downgraded?: boolean | null;
260
+ status?: string | null;
261
+ error_code?: string | null;
262
+ error_message?: string | null;
263
+ error_reason?: string | null;
264
+ error_detail?: string | null;
265
+ is_read: boolean;
266
+ is_blocked?: boolean;
267
+ recipients?: RawIMessageRecipient[] | null;
268
+ reactions?: RawIMessageMessageReaction[] | null;
269
+ created_at: string;
270
+ updated_at: string;
271
+ }
272
+ export interface RawIMessageConversation {
273
+ id: string;
274
+ assignment_id: string;
275
+ assignment_status?: string | null;
276
+ remote_number: string;
277
+ created_at: string;
278
+ updated_at: string;
279
+ }
280
+ export interface RawIMessageAssignment {
281
+ id: string;
282
+ remote_number: string;
283
+ agent_identity_id: string;
284
+ organization_id: string;
285
+ status: string;
286
+ released_at?: string | null;
287
+ created_at: string;
288
+ updated_at: string;
289
+ }
290
+ export interface RawIMessageConversationSummary extends RawIMessageConversation {
291
+ latest_text?: string | null;
292
+ latest_message_at?: string | null;
293
+ latest_direction?: string | null;
294
+ latest_has_media?: boolean;
295
+ unread_count?: number;
296
+ total_count?: number;
297
+ }
298
+ export interface RawIMessageReaction {
299
+ id: string;
300
+ conversation_id: string;
301
+ assignment_id: string;
302
+ target_message_id: string;
303
+ direction: string;
304
+ reaction: string;
305
+ custom_emoji?: string | null;
306
+ remote_number: string;
307
+ part_index?: number;
308
+ created_at: string;
309
+ updated_at: string;
310
+ }
311
+ export interface RawIMessageTriageNumber {
312
+ number: string;
313
+ connect_command: string;
314
+ }
315
+ export interface RawIMessageContactRule {
316
+ id: string;
317
+ agent_identity_id: string;
318
+ action: string;
319
+ match_type: string;
320
+ match_target: string;
321
+ status: string;
322
+ created_at: string;
323
+ updated_at: string;
324
+ }
325
+ export declare function parseIMessageMediaItem(r: RawIMessageMediaItem): IMessageMediaItem;
326
+ export declare function parseIMessageRecipient(r: RawIMessageRecipient): IMessageRecipient;
327
+ export declare function parseIMessageMessageReaction(r: RawIMessageMessageReaction): IMessageMessageReaction;
328
+ export declare function parseIMessage(r: RawIMessage): IMessage;
329
+ export declare function parseIMessageConversation(r: RawIMessageConversation): IMessageConversation;
330
+ export declare function parseIMessageAssignment(r: RawIMessageAssignment): IMessageAssignment;
331
+ export declare function parseIMessageConversationSummary(r: RawIMessageConversationSummary): IMessageConversationSummary;
332
+ export declare function parseIMessageReaction(r: RawIMessageReaction): IMessageReaction;
333
+ export declare function parseIMessageTriageNumber(r: RawIMessageTriageNumber): IMessageTriageNumber;
334
+ export declare function parseIMessageContactRule(r: RawIMessageContactRule): IMessageContactRule;
335
+ //# sourceMappingURL=types.d.ts.map
@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