samva 0.0.1 → 0.2.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/AGENTS.md +13 -0
- package/LICENSE +21 -0
- package/README.md +392 -5
- package/dist/categories-CsUa8ojo.js +143 -0
- package/dist/client/client/client.gen.d.ts +2 -0
- package/dist/client/client/index.d.ts +10 -0
- package/dist/client/client/types.gen.d.ts +120 -0
- package/dist/client/client/utils.gen.d.ts +37 -0
- package/dist/client/client.gen.d.ts +12 -0
- package/dist/client/core/auth.gen.d.ts +25 -0
- package/dist/client/core/bodySerializer.gen.d.ts +25 -0
- package/dist/client/core/params.gen.d.ts +43 -0
- package/dist/client/core/pathSerializer.gen.d.ts +33 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/client/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/client/core/types.gen.d.ts +83 -0
- package/dist/client/core/utils.gen.d.ts +19 -0
- package/dist/client/sdk.gen.d.ts +1558 -0
- package/dist/client/types.gen.d.ts +7917 -0
- package/dist/client-BqkU-sFv.js +6049 -0
- package/dist/effect/api-keys.d.ts +190 -0
- package/dist/effect/api-keys.js +27 -0
- package/dist/effect/campaigns.d.ts +2055 -0
- package/dist/effect/campaigns.js +33 -0
- package/dist/effect/categories.d.ts +65 -0
- package/dist/effect/categories.js +2 -0
- package/dist/effect/client.d.ts +9 -0
- package/dist/effect/client.js +13 -0
- package/dist/effect/contacts.d.ts +1278 -0
- package/dist/effect/contacts.js +39 -0
- package/dist/effect/conversations.d.ts +1604 -0
- package/dist/effect/conversations.js +23 -0
- package/dist/effect/design.d.ts +209 -0
- package/dist/effect/design.js +13 -0
- package/dist/effect/email.d.ts +1022 -0
- package/dist/effect/email.js +111 -0
- package/dist/effect/generated-metadata.d.ts +54 -0
- package/dist/effect/generated.d.ts +32156 -0
- package/dist/effect/index.d.ts +36 -0
- package/dist/effect/index.js +17 -0
- package/dist/effect/internal/client.d.ts +35 -0
- package/dist/effect/internal/operation.d.ts +466 -0
- package/dist/effect/messages.d.ts +1047 -0
- package/dist/effect/messages.js +23 -0
- package/dist/effect/operations.d.ts +97 -0
- package/dist/effect/operations.js +15 -0
- package/dist/effect/organizations.d.ts +559 -0
- package/dist/effect/organizations.js +21 -0
- package/dist/effect/pagination.d.ts +37 -0
- package/dist/effect/retry.d.ts +60 -0
- package/dist/effect/retry.js +112 -0
- package/dist/effect/runtime.d.ts +7 -0
- package/dist/effect/scheduled-messages.d.ts +1009 -0
- package/dist/effect/scheduled-messages.js +17 -0
- package/dist/effect/templates.d.ts +2591 -0
- package/dist/effect/templates.js +66 -0
- package/dist/effect/webhooks.d.ts +228 -0
- package/dist/effect/webhooks.js +33 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/normalize-LkWl4HUF.js +82 -0
- package/dist/normalize.d.ts +87 -0
- package/dist/operation-Ccqh_yxb.js +596 -0
- package/dist/promises/errors.gen.d.ts +179 -0
- package/dist/promises/index.d.ts +153 -0
- package/dist/promises/index.js +2 -0
- package/dist/promises/types.gen.d.ts +1 -0
- package/dist/promises-Dgv8UmCC.js +5911 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/service-map.d.ts +732 -0
- package/dist/webhooks/effect.d.ts +1 -0
- package/dist/webhooks/effect.js +1 -0
- package/dist/webhooks/promise.d.ts +1 -0
- package/dist/webhooks/promise.js +1 -0
- package/package.json +151 -4
- package/CLAUDE.md +0 -111
- package/bun.lock +0 -29
- package/index.ts +0 -1
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,1047 @@
|
|
|
1
|
+
import { type MessageSendInput, type SendOptions } from "./internal/operation";
|
|
2
|
+
export type { MessageSendInput, SendOptions };
|
|
3
|
+
export declare const list: ((input?: {
|
|
4
|
+
readonly contactId?: string | null | undefined;
|
|
5
|
+
readonly conversationId?: string | null | undefined;
|
|
6
|
+
readonly channel?: string | null | undefined;
|
|
7
|
+
readonly limit?: string | null | undefined;
|
|
8
|
+
readonly status?: string | null | undefined;
|
|
9
|
+
readonly page?: string | null | undefined;
|
|
10
|
+
readonly startDate?: string | null | undefined;
|
|
11
|
+
readonly endDate?: string | null | undefined;
|
|
12
|
+
} | undefined) => import("effect/Effect").Effect<{
|
|
13
|
+
readonly items: readonly {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly organizationId: string;
|
|
16
|
+
readonly conversationId: string | null;
|
|
17
|
+
readonly parentMessageId: string | null;
|
|
18
|
+
readonly fromActorId: string;
|
|
19
|
+
readonly actorMetadata: {
|
|
20
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
21
|
+
} | null;
|
|
22
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
23
|
+
readonly direction: "outbound" | "inbound";
|
|
24
|
+
readonly content: import("./generated").JsonValue;
|
|
25
|
+
readonly metadata: {
|
|
26
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
27
|
+
} | null;
|
|
28
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
29
|
+
readonly scheduledAt: string | null;
|
|
30
|
+
readonly tags: readonly string[];
|
|
31
|
+
readonly categories: readonly string[];
|
|
32
|
+
readonly isTest: boolean;
|
|
33
|
+
readonly isInternal: boolean;
|
|
34
|
+
readonly isAutomated: boolean;
|
|
35
|
+
readonly externalId: string | null;
|
|
36
|
+
readonly referenceId: string | null;
|
|
37
|
+
readonly apiKeyId: string | null;
|
|
38
|
+
readonly httpMethod: string | null;
|
|
39
|
+
readonly apiRequestMetadata: import("./generated").JsonValue;
|
|
40
|
+
readonly apiResponseMetadata: import("./generated").JsonValue;
|
|
41
|
+
readonly createdAt: string;
|
|
42
|
+
readonly updatedAt: string;
|
|
43
|
+
readonly createdBy: string | null;
|
|
44
|
+
readonly fromContact: {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly displayName: string | null;
|
|
48
|
+
readonly type: string;
|
|
49
|
+
readonly identities: readonly {
|
|
50
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
51
|
+
readonly identifier: string;
|
|
52
|
+
readonly verified: boolean;
|
|
53
|
+
}[];
|
|
54
|
+
} | null;
|
|
55
|
+
readonly toContacts: readonly {
|
|
56
|
+
readonly id: string;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly displayName: string | null;
|
|
59
|
+
readonly type: string;
|
|
60
|
+
readonly identities: readonly {
|
|
61
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
62
|
+
readonly identifier: string;
|
|
63
|
+
readonly verified: boolean;
|
|
64
|
+
}[];
|
|
65
|
+
}[];
|
|
66
|
+
readonly recipients: readonly {
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly messageId: string;
|
|
69
|
+
readonly actorId: string | null;
|
|
70
|
+
readonly contactId: string | null;
|
|
71
|
+
readonly identityId: string | null;
|
|
72
|
+
readonly kind: "to" | "cc" | "bcc";
|
|
73
|
+
readonly address: string;
|
|
74
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
75
|
+
readonly createdAt: string;
|
|
76
|
+
readonly updatedAt: string;
|
|
77
|
+
readonly contact: {
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly name: string;
|
|
80
|
+
readonly displayName: string | null;
|
|
81
|
+
readonly type: string;
|
|
82
|
+
readonly identities: readonly {
|
|
83
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
84
|
+
readonly identifier: string;
|
|
85
|
+
readonly verified: boolean;
|
|
86
|
+
}[];
|
|
87
|
+
} | null;
|
|
88
|
+
}[];
|
|
89
|
+
readonly deliveries: readonly {
|
|
90
|
+
readonly id: string;
|
|
91
|
+
readonly messageId: string;
|
|
92
|
+
readonly recipientId: string | null;
|
|
93
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
94
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
95
|
+
readonly attemptCount: number;
|
|
96
|
+
readonly maxAttempts: number;
|
|
97
|
+
readonly queuedAt: string | null;
|
|
98
|
+
readonly claimedAt: string | null;
|
|
99
|
+
readonly lastAttemptAt: string | null;
|
|
100
|
+
readonly nextRetryAt: string | null;
|
|
101
|
+
readonly sentAt: string | null;
|
|
102
|
+
readonly deliveredAt: string | null;
|
|
103
|
+
readonly readAt: string | null;
|
|
104
|
+
readonly failedAt: string | null;
|
|
105
|
+
readonly terminalAt: string | null;
|
|
106
|
+
readonly errorCode: string | null;
|
|
107
|
+
readonly errorMessage: string | null;
|
|
108
|
+
readonly errorDetails: import("./generated").JsonValue;
|
|
109
|
+
readonly cost: string;
|
|
110
|
+
readonly currency: string;
|
|
111
|
+
readonly idempotencyKey: string | null;
|
|
112
|
+
readonly metadata: import("./generated").JsonValue;
|
|
113
|
+
readonly createdAt: string;
|
|
114
|
+
readonly updatedAt: string;
|
|
115
|
+
}[];
|
|
116
|
+
readonly emailDeliveryDetails: readonly {
|
|
117
|
+
readonly deliveryId: string;
|
|
118
|
+
readonly messageIdHeader: string | null;
|
|
119
|
+
readonly inReplyTo: string | null;
|
|
120
|
+
readonly references: readonly string[] | null;
|
|
121
|
+
readonly subject: string;
|
|
122
|
+
readonly fromEmail: string;
|
|
123
|
+
readonly fromName: string | null;
|
|
124
|
+
readonly toEmails: readonly string[];
|
|
125
|
+
readonly toName: string | null;
|
|
126
|
+
readonly ccEmails: readonly string[] | null;
|
|
127
|
+
readonly bccEmails: readonly string[] | null;
|
|
128
|
+
readonly replyToEmails: readonly string[] | null;
|
|
129
|
+
readonly hasAttachments: boolean;
|
|
130
|
+
readonly attachmentCount: number;
|
|
131
|
+
readonly listUnsubscribeUrl: string | null;
|
|
132
|
+
readonly listUnsubscribeEmail: string | null;
|
|
133
|
+
readonly threadPosition: number | null;
|
|
134
|
+
readonly newContent: string | null;
|
|
135
|
+
readonly quotedContent: string | null;
|
|
136
|
+
readonly hasQuotedContent: boolean;
|
|
137
|
+
readonly dkimVerdict: string | null;
|
|
138
|
+
readonly spfVerdict: string | null;
|
|
139
|
+
readonly dmarcVerdict: string | null;
|
|
140
|
+
readonly isAutoReply: boolean;
|
|
141
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
142
|
+
readonly priority: string | null;
|
|
143
|
+
readonly parsingErrors: readonly string[] | null;
|
|
144
|
+
readonly parsingDuration: number | null;
|
|
145
|
+
readonly receivedAt: string | null;
|
|
146
|
+
readonly processedAt: string | null;
|
|
147
|
+
readonly createdAt: string;
|
|
148
|
+
readonly updatedAt: string;
|
|
149
|
+
}[];
|
|
150
|
+
readonly smsDeliveryDetails: readonly {
|
|
151
|
+
readonly deliveryId: string;
|
|
152
|
+
readonly fromNumber: string;
|
|
153
|
+
readonly toNumber: string;
|
|
154
|
+
readonly segmentCount: number;
|
|
155
|
+
readonly encoding: string;
|
|
156
|
+
readonly dltTemplateId: string | null;
|
|
157
|
+
readonly dltEntityId: string | null;
|
|
158
|
+
readonly dltContentId: string | null;
|
|
159
|
+
readonly carrier: string | null;
|
|
160
|
+
readonly numSegmentsReported: number | null;
|
|
161
|
+
readonly createdAt: string;
|
|
162
|
+
readonly updatedAt: string;
|
|
163
|
+
}[];
|
|
164
|
+
readonly whatsappDeliveryDetails: readonly {
|
|
165
|
+
readonly deliveryId: string;
|
|
166
|
+
readonly fromNumber: string;
|
|
167
|
+
readonly toNumber: string;
|
|
168
|
+
readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
|
|
169
|
+
readonly templateName: string | null;
|
|
170
|
+
readonly templateLanguage: string | null;
|
|
171
|
+
readonly templateCategory: string | null;
|
|
172
|
+
readonly templateParams: {
|
|
173
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
174
|
+
} | null;
|
|
175
|
+
readonly mediaUrl: string | null;
|
|
176
|
+
readonly mediaType: string | null;
|
|
177
|
+
readonly mediaS3Key: string | null;
|
|
178
|
+
readonly interactiveType: string | null;
|
|
179
|
+
readonly contextMessageId: string | null;
|
|
180
|
+
readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
|
|
181
|
+
readonly serviceWindowId: string | null;
|
|
182
|
+
readonly freeEntryPointId: string | null;
|
|
183
|
+
readonly isBillable: boolean;
|
|
184
|
+
readonly pricing: {
|
|
185
|
+
readonly messageCost: string;
|
|
186
|
+
readonly reason: string;
|
|
187
|
+
readonly sentInServiceWindow: boolean;
|
|
188
|
+
readonly sentInFreeEntryPoint: boolean;
|
|
189
|
+
} | null;
|
|
190
|
+
readonly recipientId: string | null;
|
|
191
|
+
readonly createdAt: string;
|
|
192
|
+
readonly updatedAt: string;
|
|
193
|
+
}[];
|
|
194
|
+
}[];
|
|
195
|
+
readonly pagination: {
|
|
196
|
+
readonly page: number;
|
|
197
|
+
readonly limit: number;
|
|
198
|
+
readonly total: number;
|
|
199
|
+
readonly totalPages: number;
|
|
200
|
+
};
|
|
201
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>) & {
|
|
202
|
+
readonly pages: (input?: {
|
|
203
|
+
readonly contactId?: string | null | undefined;
|
|
204
|
+
readonly conversationId?: string | null | undefined;
|
|
205
|
+
readonly channel?: string | null | undefined;
|
|
206
|
+
readonly limit?: string | null | undefined;
|
|
207
|
+
readonly status?: string | null | undefined;
|
|
208
|
+
readonly page?: string | null | undefined;
|
|
209
|
+
readonly startDate?: string | null | undefined;
|
|
210
|
+
readonly endDate?: string | null | undefined;
|
|
211
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
212
|
+
readonly items: readonly {
|
|
213
|
+
readonly id: string;
|
|
214
|
+
readonly organizationId: string;
|
|
215
|
+
readonly conversationId: string | null;
|
|
216
|
+
readonly parentMessageId: string | null;
|
|
217
|
+
readonly fromActorId: string;
|
|
218
|
+
readonly actorMetadata: {
|
|
219
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
220
|
+
} | null;
|
|
221
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
222
|
+
readonly direction: "outbound" | "inbound";
|
|
223
|
+
readonly content: import("./generated").JsonValue;
|
|
224
|
+
readonly metadata: {
|
|
225
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
226
|
+
} | null;
|
|
227
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
228
|
+
readonly scheduledAt: string | null;
|
|
229
|
+
readonly tags: readonly string[];
|
|
230
|
+
readonly categories: readonly string[];
|
|
231
|
+
readonly isTest: boolean;
|
|
232
|
+
readonly isInternal: boolean;
|
|
233
|
+
readonly isAutomated: boolean;
|
|
234
|
+
readonly externalId: string | null;
|
|
235
|
+
readonly referenceId: string | null;
|
|
236
|
+
readonly apiKeyId: string | null;
|
|
237
|
+
readonly httpMethod: string | null;
|
|
238
|
+
readonly apiRequestMetadata: import("./generated").JsonValue;
|
|
239
|
+
readonly apiResponseMetadata: import("./generated").JsonValue;
|
|
240
|
+
readonly createdAt: string;
|
|
241
|
+
readonly updatedAt: string;
|
|
242
|
+
readonly createdBy: string | null;
|
|
243
|
+
readonly fromContact: {
|
|
244
|
+
readonly id: string;
|
|
245
|
+
readonly name: string;
|
|
246
|
+
readonly displayName: string | null;
|
|
247
|
+
readonly type: string;
|
|
248
|
+
readonly identities: readonly {
|
|
249
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
250
|
+
readonly identifier: string;
|
|
251
|
+
readonly verified: boolean;
|
|
252
|
+
}[];
|
|
253
|
+
} | null;
|
|
254
|
+
readonly toContacts: readonly {
|
|
255
|
+
readonly id: string;
|
|
256
|
+
readonly name: string;
|
|
257
|
+
readonly displayName: string | null;
|
|
258
|
+
readonly type: string;
|
|
259
|
+
readonly identities: readonly {
|
|
260
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
261
|
+
readonly identifier: string;
|
|
262
|
+
readonly verified: boolean;
|
|
263
|
+
}[];
|
|
264
|
+
}[];
|
|
265
|
+
readonly recipients: readonly {
|
|
266
|
+
readonly id: string;
|
|
267
|
+
readonly messageId: string;
|
|
268
|
+
readonly actorId: string | null;
|
|
269
|
+
readonly contactId: string | null;
|
|
270
|
+
readonly identityId: string | null;
|
|
271
|
+
readonly kind: "to" | "cc" | "bcc";
|
|
272
|
+
readonly address: string;
|
|
273
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
274
|
+
readonly createdAt: string;
|
|
275
|
+
readonly updatedAt: string;
|
|
276
|
+
readonly contact: {
|
|
277
|
+
readonly id: string;
|
|
278
|
+
readonly name: string;
|
|
279
|
+
readonly displayName: string | null;
|
|
280
|
+
readonly type: string;
|
|
281
|
+
readonly identities: readonly {
|
|
282
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
283
|
+
readonly identifier: string;
|
|
284
|
+
readonly verified: boolean;
|
|
285
|
+
}[];
|
|
286
|
+
} | null;
|
|
287
|
+
}[];
|
|
288
|
+
readonly deliveries: readonly {
|
|
289
|
+
readonly id: string;
|
|
290
|
+
readonly messageId: string;
|
|
291
|
+
readonly recipientId: string | null;
|
|
292
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
293
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
294
|
+
readonly attemptCount: number;
|
|
295
|
+
readonly maxAttempts: number;
|
|
296
|
+
readonly queuedAt: string | null;
|
|
297
|
+
readonly claimedAt: string | null;
|
|
298
|
+
readonly lastAttemptAt: string | null;
|
|
299
|
+
readonly nextRetryAt: string | null;
|
|
300
|
+
readonly sentAt: string | null;
|
|
301
|
+
readonly deliveredAt: string | null;
|
|
302
|
+
readonly readAt: string | null;
|
|
303
|
+
readonly failedAt: string | null;
|
|
304
|
+
readonly terminalAt: string | null;
|
|
305
|
+
readonly errorCode: string | null;
|
|
306
|
+
readonly errorMessage: string | null;
|
|
307
|
+
readonly errorDetails: import("./generated").JsonValue;
|
|
308
|
+
readonly cost: string;
|
|
309
|
+
readonly currency: string;
|
|
310
|
+
readonly idempotencyKey: string | null;
|
|
311
|
+
readonly metadata: import("./generated").JsonValue;
|
|
312
|
+
readonly createdAt: string;
|
|
313
|
+
readonly updatedAt: string;
|
|
314
|
+
}[];
|
|
315
|
+
readonly emailDeliveryDetails: readonly {
|
|
316
|
+
readonly deliveryId: string;
|
|
317
|
+
readonly messageIdHeader: string | null;
|
|
318
|
+
readonly inReplyTo: string | null;
|
|
319
|
+
readonly references: readonly string[] | null;
|
|
320
|
+
readonly subject: string;
|
|
321
|
+
readonly fromEmail: string;
|
|
322
|
+
readonly fromName: string | null;
|
|
323
|
+
readonly toEmails: readonly string[];
|
|
324
|
+
readonly toName: string | null;
|
|
325
|
+
readonly ccEmails: readonly string[] | null;
|
|
326
|
+
readonly bccEmails: readonly string[] | null;
|
|
327
|
+
readonly replyToEmails: readonly string[] | null;
|
|
328
|
+
readonly hasAttachments: boolean;
|
|
329
|
+
readonly attachmentCount: number;
|
|
330
|
+
readonly listUnsubscribeUrl: string | null;
|
|
331
|
+
readonly listUnsubscribeEmail: string | null;
|
|
332
|
+
readonly threadPosition: number | null;
|
|
333
|
+
readonly newContent: string | null;
|
|
334
|
+
readonly quotedContent: string | null;
|
|
335
|
+
readonly hasQuotedContent: boolean;
|
|
336
|
+
readonly dkimVerdict: string | null;
|
|
337
|
+
readonly spfVerdict: string | null;
|
|
338
|
+
readonly dmarcVerdict: string | null;
|
|
339
|
+
readonly isAutoReply: boolean;
|
|
340
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
341
|
+
readonly priority: string | null;
|
|
342
|
+
readonly parsingErrors: readonly string[] | null;
|
|
343
|
+
readonly parsingDuration: number | null;
|
|
344
|
+
readonly receivedAt: string | null;
|
|
345
|
+
readonly processedAt: string | null;
|
|
346
|
+
readonly createdAt: string;
|
|
347
|
+
readonly updatedAt: string;
|
|
348
|
+
}[];
|
|
349
|
+
readonly smsDeliveryDetails: readonly {
|
|
350
|
+
readonly deliveryId: string;
|
|
351
|
+
readonly fromNumber: string;
|
|
352
|
+
readonly toNumber: string;
|
|
353
|
+
readonly segmentCount: number;
|
|
354
|
+
readonly encoding: string;
|
|
355
|
+
readonly dltTemplateId: string | null;
|
|
356
|
+
readonly dltEntityId: string | null;
|
|
357
|
+
readonly dltContentId: string | null;
|
|
358
|
+
readonly carrier: string | null;
|
|
359
|
+
readonly numSegmentsReported: number | null;
|
|
360
|
+
readonly createdAt: string;
|
|
361
|
+
readonly updatedAt: string;
|
|
362
|
+
}[];
|
|
363
|
+
readonly whatsappDeliveryDetails: readonly {
|
|
364
|
+
readonly deliveryId: string;
|
|
365
|
+
readonly fromNumber: string;
|
|
366
|
+
readonly toNumber: string;
|
|
367
|
+
readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
|
|
368
|
+
readonly templateName: string | null;
|
|
369
|
+
readonly templateLanguage: string | null;
|
|
370
|
+
readonly templateCategory: string | null;
|
|
371
|
+
readonly templateParams: {
|
|
372
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
373
|
+
} | null;
|
|
374
|
+
readonly mediaUrl: string | null;
|
|
375
|
+
readonly mediaType: string | null;
|
|
376
|
+
readonly mediaS3Key: string | null;
|
|
377
|
+
readonly interactiveType: string | null;
|
|
378
|
+
readonly contextMessageId: string | null;
|
|
379
|
+
readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
|
|
380
|
+
readonly serviceWindowId: string | null;
|
|
381
|
+
readonly freeEntryPointId: string | null;
|
|
382
|
+
readonly isBillable: boolean;
|
|
383
|
+
readonly pricing: {
|
|
384
|
+
readonly messageCost: string;
|
|
385
|
+
readonly reason: string;
|
|
386
|
+
readonly sentInServiceWindow: boolean;
|
|
387
|
+
readonly sentInFreeEntryPoint: boolean;
|
|
388
|
+
} | null;
|
|
389
|
+
readonly recipientId: string | null;
|
|
390
|
+
readonly createdAt: string;
|
|
391
|
+
readonly updatedAt: string;
|
|
392
|
+
}[];
|
|
393
|
+
}[];
|
|
394
|
+
readonly pagination: {
|
|
395
|
+
readonly page: number;
|
|
396
|
+
readonly limit: number;
|
|
397
|
+
readonly total: number;
|
|
398
|
+
readonly totalPages: number;
|
|
399
|
+
};
|
|
400
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
401
|
+
readonly items: (input?: {
|
|
402
|
+
readonly contactId?: string | null | undefined;
|
|
403
|
+
readonly conversationId?: string | null | undefined;
|
|
404
|
+
readonly channel?: string | null | undefined;
|
|
405
|
+
readonly limit?: string | null | undefined;
|
|
406
|
+
readonly status?: string | null | undefined;
|
|
407
|
+
readonly page?: string | null | undefined;
|
|
408
|
+
readonly startDate?: string | null | undefined;
|
|
409
|
+
readonly endDate?: string | null | undefined;
|
|
410
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
411
|
+
readonly id: string;
|
|
412
|
+
readonly organizationId: string;
|
|
413
|
+
readonly conversationId: string | null;
|
|
414
|
+
readonly parentMessageId: string | null;
|
|
415
|
+
readonly fromActorId: string;
|
|
416
|
+
readonly actorMetadata: {
|
|
417
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
418
|
+
} | null;
|
|
419
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
420
|
+
readonly direction: "outbound" | "inbound";
|
|
421
|
+
readonly content: import("./generated").JsonValue;
|
|
422
|
+
readonly metadata: {
|
|
423
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
424
|
+
} | null;
|
|
425
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
426
|
+
readonly scheduledAt: string | null;
|
|
427
|
+
readonly tags: readonly string[];
|
|
428
|
+
readonly categories: readonly string[];
|
|
429
|
+
readonly isTest: boolean;
|
|
430
|
+
readonly isInternal: boolean;
|
|
431
|
+
readonly isAutomated: boolean;
|
|
432
|
+
readonly externalId: string | null;
|
|
433
|
+
readonly referenceId: string | null;
|
|
434
|
+
readonly apiKeyId: string | null;
|
|
435
|
+
readonly httpMethod: string | null;
|
|
436
|
+
readonly apiRequestMetadata: import("./generated").JsonValue;
|
|
437
|
+
readonly apiResponseMetadata: import("./generated").JsonValue;
|
|
438
|
+
readonly createdAt: string;
|
|
439
|
+
readonly updatedAt: string;
|
|
440
|
+
readonly createdBy: string | null;
|
|
441
|
+
readonly fromContact: {
|
|
442
|
+
readonly id: string;
|
|
443
|
+
readonly name: string;
|
|
444
|
+
readonly displayName: string | null;
|
|
445
|
+
readonly type: string;
|
|
446
|
+
readonly identities: readonly {
|
|
447
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
448
|
+
readonly identifier: string;
|
|
449
|
+
readonly verified: boolean;
|
|
450
|
+
}[];
|
|
451
|
+
} | null;
|
|
452
|
+
readonly toContacts: readonly {
|
|
453
|
+
readonly id: string;
|
|
454
|
+
readonly name: string;
|
|
455
|
+
readonly displayName: string | null;
|
|
456
|
+
readonly type: string;
|
|
457
|
+
readonly identities: readonly {
|
|
458
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
459
|
+
readonly identifier: string;
|
|
460
|
+
readonly verified: boolean;
|
|
461
|
+
}[];
|
|
462
|
+
}[];
|
|
463
|
+
readonly recipients: readonly {
|
|
464
|
+
readonly id: string;
|
|
465
|
+
readonly messageId: string;
|
|
466
|
+
readonly actorId: string | null;
|
|
467
|
+
readonly contactId: string | null;
|
|
468
|
+
readonly identityId: string | null;
|
|
469
|
+
readonly kind: "to" | "cc" | "bcc";
|
|
470
|
+
readonly address: string;
|
|
471
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
472
|
+
readonly createdAt: string;
|
|
473
|
+
readonly updatedAt: string;
|
|
474
|
+
readonly contact: {
|
|
475
|
+
readonly id: string;
|
|
476
|
+
readonly name: string;
|
|
477
|
+
readonly displayName: string | null;
|
|
478
|
+
readonly type: string;
|
|
479
|
+
readonly identities: readonly {
|
|
480
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
481
|
+
readonly identifier: string;
|
|
482
|
+
readonly verified: boolean;
|
|
483
|
+
}[];
|
|
484
|
+
} | null;
|
|
485
|
+
}[];
|
|
486
|
+
readonly deliveries: readonly {
|
|
487
|
+
readonly id: string;
|
|
488
|
+
readonly messageId: string;
|
|
489
|
+
readonly recipientId: string | null;
|
|
490
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
491
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
492
|
+
readonly attemptCount: number;
|
|
493
|
+
readonly maxAttempts: number;
|
|
494
|
+
readonly queuedAt: string | null;
|
|
495
|
+
readonly claimedAt: string | null;
|
|
496
|
+
readonly lastAttemptAt: string | null;
|
|
497
|
+
readonly nextRetryAt: string | null;
|
|
498
|
+
readonly sentAt: string | null;
|
|
499
|
+
readonly deliveredAt: string | null;
|
|
500
|
+
readonly readAt: string | null;
|
|
501
|
+
readonly failedAt: string | null;
|
|
502
|
+
readonly terminalAt: string | null;
|
|
503
|
+
readonly errorCode: string | null;
|
|
504
|
+
readonly errorMessage: string | null;
|
|
505
|
+
readonly errorDetails: import("./generated").JsonValue;
|
|
506
|
+
readonly cost: string;
|
|
507
|
+
readonly currency: string;
|
|
508
|
+
readonly idempotencyKey: string | null;
|
|
509
|
+
readonly metadata: import("./generated").JsonValue;
|
|
510
|
+
readonly createdAt: string;
|
|
511
|
+
readonly updatedAt: string;
|
|
512
|
+
}[];
|
|
513
|
+
readonly emailDeliveryDetails: readonly {
|
|
514
|
+
readonly deliveryId: string;
|
|
515
|
+
readonly messageIdHeader: string | null;
|
|
516
|
+
readonly inReplyTo: string | null;
|
|
517
|
+
readonly references: readonly string[] | null;
|
|
518
|
+
readonly subject: string;
|
|
519
|
+
readonly fromEmail: string;
|
|
520
|
+
readonly fromName: string | null;
|
|
521
|
+
readonly toEmails: readonly string[];
|
|
522
|
+
readonly toName: string | null;
|
|
523
|
+
readonly ccEmails: readonly string[] | null;
|
|
524
|
+
readonly bccEmails: readonly string[] | null;
|
|
525
|
+
readonly replyToEmails: readonly string[] | null;
|
|
526
|
+
readonly hasAttachments: boolean;
|
|
527
|
+
readonly attachmentCount: number;
|
|
528
|
+
readonly listUnsubscribeUrl: string | null;
|
|
529
|
+
readonly listUnsubscribeEmail: string | null;
|
|
530
|
+
readonly threadPosition: number | null;
|
|
531
|
+
readonly newContent: string | null;
|
|
532
|
+
readonly quotedContent: string | null;
|
|
533
|
+
readonly hasQuotedContent: boolean;
|
|
534
|
+
readonly dkimVerdict: string | null;
|
|
535
|
+
readonly spfVerdict: string | null;
|
|
536
|
+
readonly dmarcVerdict: string | null;
|
|
537
|
+
readonly isAutoReply: boolean;
|
|
538
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
539
|
+
readonly priority: string | null;
|
|
540
|
+
readonly parsingErrors: readonly string[] | null;
|
|
541
|
+
readonly parsingDuration: number | null;
|
|
542
|
+
readonly receivedAt: string | null;
|
|
543
|
+
readonly processedAt: string | null;
|
|
544
|
+
readonly createdAt: string;
|
|
545
|
+
readonly updatedAt: string;
|
|
546
|
+
}[];
|
|
547
|
+
readonly smsDeliveryDetails: readonly {
|
|
548
|
+
readonly deliveryId: string;
|
|
549
|
+
readonly fromNumber: string;
|
|
550
|
+
readonly toNumber: string;
|
|
551
|
+
readonly segmentCount: number;
|
|
552
|
+
readonly encoding: string;
|
|
553
|
+
readonly dltTemplateId: string | null;
|
|
554
|
+
readonly dltEntityId: string | null;
|
|
555
|
+
readonly dltContentId: string | null;
|
|
556
|
+
readonly carrier: string | null;
|
|
557
|
+
readonly numSegmentsReported: number | null;
|
|
558
|
+
readonly createdAt: string;
|
|
559
|
+
readonly updatedAt: string;
|
|
560
|
+
}[];
|
|
561
|
+
readonly whatsappDeliveryDetails: readonly {
|
|
562
|
+
readonly deliveryId: string;
|
|
563
|
+
readonly fromNumber: string;
|
|
564
|
+
readonly toNumber: string;
|
|
565
|
+
readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
|
|
566
|
+
readonly templateName: string | null;
|
|
567
|
+
readonly templateLanguage: string | null;
|
|
568
|
+
readonly templateCategory: string | null;
|
|
569
|
+
readonly templateParams: {
|
|
570
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
571
|
+
} | null;
|
|
572
|
+
readonly mediaUrl: string | null;
|
|
573
|
+
readonly mediaType: string | null;
|
|
574
|
+
readonly mediaS3Key: string | null;
|
|
575
|
+
readonly interactiveType: string | null;
|
|
576
|
+
readonly contextMessageId: string | null;
|
|
577
|
+
readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
|
|
578
|
+
readonly serviceWindowId: string | null;
|
|
579
|
+
readonly freeEntryPointId: string | null;
|
|
580
|
+
readonly isBillable: boolean;
|
|
581
|
+
readonly pricing: {
|
|
582
|
+
readonly messageCost: string;
|
|
583
|
+
readonly reason: string;
|
|
584
|
+
readonly sentInServiceWindow: boolean;
|
|
585
|
+
readonly sentInFreeEntryPoint: boolean;
|
|
586
|
+
} | null;
|
|
587
|
+
readonly recipientId: string | null;
|
|
588
|
+
readonly createdAt: string;
|
|
589
|
+
readonly updatedAt: string;
|
|
590
|
+
}[];
|
|
591
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
592
|
+
};
|
|
593
|
+
export declare const send: (input: MessageSendInput, options?: SendOptions | undefined) => import("effect/Effect").Effect<{
|
|
594
|
+
readonly id: string;
|
|
595
|
+
readonly organizationId: string;
|
|
596
|
+
readonly conversationId: string | null;
|
|
597
|
+
readonly parentMessageId: string | null;
|
|
598
|
+
readonly fromActorId: string;
|
|
599
|
+
readonly actorMetadata: {
|
|
600
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
601
|
+
} | null;
|
|
602
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
603
|
+
readonly direction: "outbound" | "inbound";
|
|
604
|
+
readonly content: import("./generated").JsonValue;
|
|
605
|
+
readonly metadata: {
|
|
606
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
607
|
+
} | null;
|
|
608
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
609
|
+
readonly scheduledAt: string | null;
|
|
610
|
+
readonly tags: readonly string[];
|
|
611
|
+
readonly categories: readonly string[];
|
|
612
|
+
readonly isTest: boolean;
|
|
613
|
+
readonly isInternal: boolean;
|
|
614
|
+
readonly isAutomated: boolean;
|
|
615
|
+
readonly externalId: string | null;
|
|
616
|
+
readonly referenceId: string | null;
|
|
617
|
+
readonly apiKeyId: string | null;
|
|
618
|
+
readonly httpMethod: string | null;
|
|
619
|
+
readonly apiRequestMetadata: import("./generated").JsonValue;
|
|
620
|
+
readonly apiResponseMetadata: import("./generated").JsonValue;
|
|
621
|
+
readonly createdAt: string;
|
|
622
|
+
readonly updatedAt: string;
|
|
623
|
+
readonly createdBy: string | null;
|
|
624
|
+
readonly fromContact: {
|
|
625
|
+
readonly id: string;
|
|
626
|
+
readonly name: string;
|
|
627
|
+
readonly displayName: string | null;
|
|
628
|
+
readonly type: string;
|
|
629
|
+
readonly identities: readonly {
|
|
630
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
631
|
+
readonly identifier: string;
|
|
632
|
+
readonly verified: boolean;
|
|
633
|
+
}[];
|
|
634
|
+
} | null;
|
|
635
|
+
readonly toContacts: readonly {
|
|
636
|
+
readonly id: string;
|
|
637
|
+
readonly name: string;
|
|
638
|
+
readonly displayName: string | null;
|
|
639
|
+
readonly type: string;
|
|
640
|
+
readonly identities: readonly {
|
|
641
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
642
|
+
readonly identifier: string;
|
|
643
|
+
readonly verified: boolean;
|
|
644
|
+
}[];
|
|
645
|
+
}[];
|
|
646
|
+
readonly recipients: readonly {
|
|
647
|
+
readonly id: string;
|
|
648
|
+
readonly messageId: string;
|
|
649
|
+
readonly actorId: string | null;
|
|
650
|
+
readonly contactId: string | null;
|
|
651
|
+
readonly identityId: string | null;
|
|
652
|
+
readonly kind: "to" | "cc" | "bcc";
|
|
653
|
+
readonly address: string;
|
|
654
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
655
|
+
readonly createdAt: string;
|
|
656
|
+
readonly updatedAt: string;
|
|
657
|
+
readonly contact: {
|
|
658
|
+
readonly id: string;
|
|
659
|
+
readonly name: string;
|
|
660
|
+
readonly displayName: string | null;
|
|
661
|
+
readonly type: string;
|
|
662
|
+
readonly identities: readonly {
|
|
663
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
664
|
+
readonly identifier: string;
|
|
665
|
+
readonly verified: boolean;
|
|
666
|
+
}[];
|
|
667
|
+
} | null;
|
|
668
|
+
}[];
|
|
669
|
+
readonly deliveries: readonly {
|
|
670
|
+
readonly id: string;
|
|
671
|
+
readonly messageId: string;
|
|
672
|
+
readonly recipientId: string | null;
|
|
673
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
674
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
675
|
+
readonly attemptCount: number;
|
|
676
|
+
readonly maxAttempts: number;
|
|
677
|
+
readonly queuedAt: string | null;
|
|
678
|
+
readonly claimedAt: string | null;
|
|
679
|
+
readonly lastAttemptAt: string | null;
|
|
680
|
+
readonly nextRetryAt: string | null;
|
|
681
|
+
readonly sentAt: string | null;
|
|
682
|
+
readonly deliveredAt: string | null;
|
|
683
|
+
readonly readAt: string | null;
|
|
684
|
+
readonly failedAt: string | null;
|
|
685
|
+
readonly terminalAt: string | null;
|
|
686
|
+
readonly errorCode: string | null;
|
|
687
|
+
readonly errorMessage: string | null;
|
|
688
|
+
readonly errorDetails: import("./generated").JsonValue;
|
|
689
|
+
readonly cost: string;
|
|
690
|
+
readonly currency: string;
|
|
691
|
+
readonly idempotencyKey: string | null;
|
|
692
|
+
readonly metadata: import("./generated").JsonValue;
|
|
693
|
+
readonly createdAt: string;
|
|
694
|
+
readonly updatedAt: string;
|
|
695
|
+
}[];
|
|
696
|
+
readonly emailDeliveryDetails: readonly {
|
|
697
|
+
readonly deliveryId: string;
|
|
698
|
+
readonly messageIdHeader: string | null;
|
|
699
|
+
readonly inReplyTo: string | null;
|
|
700
|
+
readonly references: readonly string[] | null;
|
|
701
|
+
readonly subject: string;
|
|
702
|
+
readonly fromEmail: string;
|
|
703
|
+
readonly fromName: string | null;
|
|
704
|
+
readonly toEmails: readonly string[];
|
|
705
|
+
readonly toName: string | null;
|
|
706
|
+
readonly ccEmails: readonly string[] | null;
|
|
707
|
+
readonly bccEmails: readonly string[] | null;
|
|
708
|
+
readonly replyToEmails: readonly string[] | null;
|
|
709
|
+
readonly hasAttachments: boolean;
|
|
710
|
+
readonly attachmentCount: number;
|
|
711
|
+
readonly listUnsubscribeUrl: string | null;
|
|
712
|
+
readonly listUnsubscribeEmail: string | null;
|
|
713
|
+
readonly threadPosition: number | null;
|
|
714
|
+
readonly newContent: string | null;
|
|
715
|
+
readonly quotedContent: string | null;
|
|
716
|
+
readonly hasQuotedContent: boolean;
|
|
717
|
+
readonly dkimVerdict: string | null;
|
|
718
|
+
readonly spfVerdict: string | null;
|
|
719
|
+
readonly dmarcVerdict: string | null;
|
|
720
|
+
readonly isAutoReply: boolean;
|
|
721
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
722
|
+
readonly priority: string | null;
|
|
723
|
+
readonly parsingErrors: readonly string[] | null;
|
|
724
|
+
readonly parsingDuration: number | null;
|
|
725
|
+
readonly receivedAt: string | null;
|
|
726
|
+
readonly processedAt: string | null;
|
|
727
|
+
readonly createdAt: string;
|
|
728
|
+
readonly updatedAt: string;
|
|
729
|
+
}[];
|
|
730
|
+
readonly smsDeliveryDetails: readonly {
|
|
731
|
+
readonly deliveryId: string;
|
|
732
|
+
readonly fromNumber: string;
|
|
733
|
+
readonly toNumber: string;
|
|
734
|
+
readonly segmentCount: number;
|
|
735
|
+
readonly encoding: string;
|
|
736
|
+
readonly dltTemplateId: string | null;
|
|
737
|
+
readonly dltEntityId: string | null;
|
|
738
|
+
readonly dltContentId: string | null;
|
|
739
|
+
readonly carrier: string | null;
|
|
740
|
+
readonly numSegmentsReported: number | null;
|
|
741
|
+
readonly createdAt: string;
|
|
742
|
+
readonly updatedAt: string;
|
|
743
|
+
}[];
|
|
744
|
+
readonly whatsappDeliveryDetails: readonly {
|
|
745
|
+
readonly deliveryId: string;
|
|
746
|
+
readonly fromNumber: string;
|
|
747
|
+
readonly toNumber: string;
|
|
748
|
+
readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
|
|
749
|
+
readonly templateName: string | null;
|
|
750
|
+
readonly templateLanguage: string | null;
|
|
751
|
+
readonly templateCategory: string | null;
|
|
752
|
+
readonly templateParams: {
|
|
753
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
754
|
+
} | null;
|
|
755
|
+
readonly mediaUrl: string | null;
|
|
756
|
+
readonly mediaType: string | null;
|
|
757
|
+
readonly mediaS3Key: string | null;
|
|
758
|
+
readonly interactiveType: string | null;
|
|
759
|
+
readonly contextMessageId: string | null;
|
|
760
|
+
readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
|
|
761
|
+
readonly serviceWindowId: string | null;
|
|
762
|
+
readonly freeEntryPointId: string | null;
|
|
763
|
+
readonly isBillable: boolean;
|
|
764
|
+
readonly pricing: {
|
|
765
|
+
readonly messageCost: string;
|
|
766
|
+
readonly reason: string;
|
|
767
|
+
readonly sentInServiceWindow: boolean;
|
|
768
|
+
readonly sentInFreeEntryPoint: boolean;
|
|
769
|
+
} | null;
|
|
770
|
+
readonly recipientId: string | null;
|
|
771
|
+
readonly createdAt: string;
|
|
772
|
+
readonly updatedAt: string;
|
|
773
|
+
}[];
|
|
774
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("./generated").WebhookEnqueueError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
775
|
+
export declare const get: (input: {
|
|
776
|
+
readonly id: string;
|
|
777
|
+
}) => import("effect/Effect").Effect<{
|
|
778
|
+
readonly id: string;
|
|
779
|
+
readonly organizationId: string;
|
|
780
|
+
readonly conversationId: string | null;
|
|
781
|
+
readonly parentMessageId: string | null;
|
|
782
|
+
readonly fromActorId: string;
|
|
783
|
+
readonly actorMetadata: {
|
|
784
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
785
|
+
} | null;
|
|
786
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
787
|
+
readonly direction: "outbound" | "inbound";
|
|
788
|
+
readonly content: import("./generated").JsonValue;
|
|
789
|
+
readonly metadata: {
|
|
790
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
791
|
+
} | null;
|
|
792
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
793
|
+
readonly scheduledAt: string | null;
|
|
794
|
+
readonly tags: readonly string[];
|
|
795
|
+
readonly categories: readonly string[];
|
|
796
|
+
readonly isTest: boolean;
|
|
797
|
+
readonly isInternal: boolean;
|
|
798
|
+
readonly isAutomated: boolean;
|
|
799
|
+
readonly externalId: string | null;
|
|
800
|
+
readonly referenceId: string | null;
|
|
801
|
+
readonly apiKeyId: string | null;
|
|
802
|
+
readonly httpMethod: string | null;
|
|
803
|
+
readonly apiRequestMetadata: import("./generated").JsonValue;
|
|
804
|
+
readonly apiResponseMetadata: import("./generated").JsonValue;
|
|
805
|
+
readonly createdAt: string;
|
|
806
|
+
readonly updatedAt: string;
|
|
807
|
+
readonly createdBy: string | null;
|
|
808
|
+
readonly fromContact: {
|
|
809
|
+
readonly id: string;
|
|
810
|
+
readonly name: string;
|
|
811
|
+
readonly displayName: string | null;
|
|
812
|
+
readonly type: string;
|
|
813
|
+
readonly identities: readonly {
|
|
814
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
815
|
+
readonly identifier: string;
|
|
816
|
+
readonly verified: boolean;
|
|
817
|
+
}[];
|
|
818
|
+
} | null;
|
|
819
|
+
readonly toContacts: readonly {
|
|
820
|
+
readonly id: string;
|
|
821
|
+
readonly name: string;
|
|
822
|
+
readonly displayName: string | null;
|
|
823
|
+
readonly type: string;
|
|
824
|
+
readonly identities: readonly {
|
|
825
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
826
|
+
readonly identifier: string;
|
|
827
|
+
readonly verified: boolean;
|
|
828
|
+
}[];
|
|
829
|
+
}[];
|
|
830
|
+
readonly recipients: readonly {
|
|
831
|
+
readonly id: string;
|
|
832
|
+
readonly messageId: string;
|
|
833
|
+
readonly actorId: string | null;
|
|
834
|
+
readonly contactId: string | null;
|
|
835
|
+
readonly identityId: string | null;
|
|
836
|
+
readonly kind: "to" | "cc" | "bcc";
|
|
837
|
+
readonly address: string;
|
|
838
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
839
|
+
readonly createdAt: string;
|
|
840
|
+
readonly updatedAt: string;
|
|
841
|
+
readonly contact: {
|
|
842
|
+
readonly id: string;
|
|
843
|
+
readonly name: string;
|
|
844
|
+
readonly displayName: string | null;
|
|
845
|
+
readonly type: string;
|
|
846
|
+
readonly identities: readonly {
|
|
847
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
848
|
+
readonly identifier: string;
|
|
849
|
+
readonly verified: boolean;
|
|
850
|
+
}[];
|
|
851
|
+
} | null;
|
|
852
|
+
}[];
|
|
853
|
+
readonly deliveries: readonly {
|
|
854
|
+
readonly id: string;
|
|
855
|
+
readonly messageId: string;
|
|
856
|
+
readonly recipientId: string | null;
|
|
857
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
858
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
859
|
+
readonly attemptCount: number;
|
|
860
|
+
readonly maxAttempts: number;
|
|
861
|
+
readonly queuedAt: string | null;
|
|
862
|
+
readonly claimedAt: string | null;
|
|
863
|
+
readonly lastAttemptAt: string | null;
|
|
864
|
+
readonly nextRetryAt: string | null;
|
|
865
|
+
readonly sentAt: string | null;
|
|
866
|
+
readonly deliveredAt: string | null;
|
|
867
|
+
readonly readAt: string | null;
|
|
868
|
+
readonly failedAt: string | null;
|
|
869
|
+
readonly terminalAt: string | null;
|
|
870
|
+
readonly errorCode: string | null;
|
|
871
|
+
readonly errorMessage: string | null;
|
|
872
|
+
readonly errorDetails: import("./generated").JsonValue;
|
|
873
|
+
readonly cost: string;
|
|
874
|
+
readonly currency: string;
|
|
875
|
+
readonly idempotencyKey: string | null;
|
|
876
|
+
readonly metadata: import("./generated").JsonValue;
|
|
877
|
+
readonly createdAt: string;
|
|
878
|
+
readonly updatedAt: string;
|
|
879
|
+
}[];
|
|
880
|
+
readonly emailDeliveryDetails: readonly {
|
|
881
|
+
readonly deliveryId: string;
|
|
882
|
+
readonly messageIdHeader: string | null;
|
|
883
|
+
readonly inReplyTo: string | null;
|
|
884
|
+
readonly references: readonly string[] | null;
|
|
885
|
+
readonly subject: string;
|
|
886
|
+
readonly fromEmail: string;
|
|
887
|
+
readonly fromName: string | null;
|
|
888
|
+
readonly toEmails: readonly string[];
|
|
889
|
+
readonly toName: string | null;
|
|
890
|
+
readonly ccEmails: readonly string[] | null;
|
|
891
|
+
readonly bccEmails: readonly string[] | null;
|
|
892
|
+
readonly replyToEmails: readonly string[] | null;
|
|
893
|
+
readonly hasAttachments: boolean;
|
|
894
|
+
readonly attachmentCount: number;
|
|
895
|
+
readonly listUnsubscribeUrl: string | null;
|
|
896
|
+
readonly listUnsubscribeEmail: string | null;
|
|
897
|
+
readonly threadPosition: number | null;
|
|
898
|
+
readonly newContent: string | null;
|
|
899
|
+
readonly quotedContent: string | null;
|
|
900
|
+
readonly hasQuotedContent: boolean;
|
|
901
|
+
readonly dkimVerdict: string | null;
|
|
902
|
+
readonly spfVerdict: string | null;
|
|
903
|
+
readonly dmarcVerdict: string | null;
|
|
904
|
+
readonly isAutoReply: boolean;
|
|
905
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
906
|
+
readonly priority: string | null;
|
|
907
|
+
readonly parsingErrors: readonly string[] | null;
|
|
908
|
+
readonly parsingDuration: number | null;
|
|
909
|
+
readonly receivedAt: string | null;
|
|
910
|
+
readonly processedAt: string | null;
|
|
911
|
+
readonly createdAt: string;
|
|
912
|
+
readonly updatedAt: string;
|
|
913
|
+
}[];
|
|
914
|
+
readonly smsDeliveryDetails: readonly {
|
|
915
|
+
readonly deliveryId: string;
|
|
916
|
+
readonly fromNumber: string;
|
|
917
|
+
readonly toNumber: string;
|
|
918
|
+
readonly segmentCount: number;
|
|
919
|
+
readonly encoding: string;
|
|
920
|
+
readonly dltTemplateId: string | null;
|
|
921
|
+
readonly dltEntityId: string | null;
|
|
922
|
+
readonly dltContentId: string | null;
|
|
923
|
+
readonly carrier: string | null;
|
|
924
|
+
readonly numSegmentsReported: number | null;
|
|
925
|
+
readonly createdAt: string;
|
|
926
|
+
readonly updatedAt: string;
|
|
927
|
+
}[];
|
|
928
|
+
readonly whatsappDeliveryDetails: readonly {
|
|
929
|
+
readonly deliveryId: string;
|
|
930
|
+
readonly fromNumber: string;
|
|
931
|
+
readonly toNumber: string;
|
|
932
|
+
readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
|
|
933
|
+
readonly templateName: string | null;
|
|
934
|
+
readonly templateLanguage: string | null;
|
|
935
|
+
readonly templateCategory: string | null;
|
|
936
|
+
readonly templateParams: {
|
|
937
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
938
|
+
} | null;
|
|
939
|
+
readonly mediaUrl: string | null;
|
|
940
|
+
readonly mediaType: string | null;
|
|
941
|
+
readonly mediaS3Key: string | null;
|
|
942
|
+
readonly interactiveType: string | null;
|
|
943
|
+
readonly contextMessageId: string | null;
|
|
944
|
+
readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
|
|
945
|
+
readonly serviceWindowId: string | null;
|
|
946
|
+
readonly freeEntryPointId: string | null;
|
|
947
|
+
readonly isBillable: boolean;
|
|
948
|
+
readonly pricing: {
|
|
949
|
+
readonly messageCost: string;
|
|
950
|
+
readonly reason: string;
|
|
951
|
+
readonly sentInServiceWindow: boolean;
|
|
952
|
+
readonly sentInFreeEntryPoint: boolean;
|
|
953
|
+
} | null;
|
|
954
|
+
readonly recipientId: string | null;
|
|
955
|
+
readonly createdAt: string;
|
|
956
|
+
readonly updatedAt: string;
|
|
957
|
+
}[];
|
|
958
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
959
|
+
export declare const getEmail: (input: {
|
|
960
|
+
readonly id: string;
|
|
961
|
+
readonly includeS3Urls?: string | null | undefined;
|
|
962
|
+
readonly urlExpiresIn?: string | null | undefined;
|
|
963
|
+
}) => import("effect/Effect").Effect<{
|
|
964
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
965
|
+
readonly organizationId: string;
|
|
966
|
+
readonly conversationId: (string & import("effect/Brand").Brand<"ConversationId">) | null;
|
|
967
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
968
|
+
readonly channel: "sms" | "whatsapp" | "email";
|
|
969
|
+
readonly direction: "outbound" | "inbound";
|
|
970
|
+
readonly subject: string | null;
|
|
971
|
+
readonly fromEmail: string;
|
|
972
|
+
readonly fromName: string | null;
|
|
973
|
+
readonly toEmails: readonly {
|
|
974
|
+
readonly email: string;
|
|
975
|
+
readonly name: string | null;
|
|
976
|
+
}[];
|
|
977
|
+
readonly ccEmails: readonly {
|
|
978
|
+
readonly email: string;
|
|
979
|
+
readonly name: string | null;
|
|
980
|
+
}[] | null;
|
|
981
|
+
readonly bccEmails: readonly {
|
|
982
|
+
readonly email: string;
|
|
983
|
+
readonly name: string | null;
|
|
984
|
+
}[] | null;
|
|
985
|
+
readonly replyToEmails: readonly string[] | null;
|
|
986
|
+
readonly messageIdHeader: string;
|
|
987
|
+
readonly inReplyTo: string | null;
|
|
988
|
+
readonly references: readonly string[] | null;
|
|
989
|
+
readonly threadPosition: number | null;
|
|
990
|
+
readonly newContent: string | null;
|
|
991
|
+
readonly quotedContent: string | null;
|
|
992
|
+
readonly hasQuotedContent: boolean;
|
|
993
|
+
readonly dkimVerdict: "none" | "pass" | "fail" | "softfail" | "neutral" | "policy" | "temperror" | "permerror" | null;
|
|
994
|
+
readonly spfVerdict: "none" | "pass" | "fail" | "softfail" | "neutral" | "policy" | "temperror" | "permerror" | null;
|
|
995
|
+
readonly dmarcVerdict: "none" | "pass" | "fail" | "softfail" | "neutral" | "policy" | "temperror" | "permerror" | null;
|
|
996
|
+
readonly isAutoReply: boolean;
|
|
997
|
+
readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
|
|
998
|
+
readonly listUnsubscribeUrl: string | null;
|
|
999
|
+
readonly listUnsubscribeEmail: string | null;
|
|
1000
|
+
readonly priority: "low" | "high" | "normal" | null;
|
|
1001
|
+
readonly parsingErrors: readonly string[] | null;
|
|
1002
|
+
readonly parsingDuration: number | null;
|
|
1003
|
+
readonly hasAttachments: boolean;
|
|
1004
|
+
readonly attachmentCount: number;
|
|
1005
|
+
readonly attachments: readonly {
|
|
1006
|
+
readonly id: string & import("effect/Brand").Brand<"AttachmentId">;
|
|
1007
|
+
readonly filename: string;
|
|
1008
|
+
readonly contentType: string;
|
|
1009
|
+
readonly size: number;
|
|
1010
|
+
readonly isInline: boolean;
|
|
1011
|
+
readonly contentId: string | null;
|
|
1012
|
+
}[];
|
|
1013
|
+
readonly s3ContentUrls: {
|
|
1014
|
+
readonly rawMime: string | null;
|
|
1015
|
+
readonly html: string | null;
|
|
1016
|
+
readonly text: string | null;
|
|
1017
|
+
readonly expiresAt: string;
|
|
1018
|
+
} | null;
|
|
1019
|
+
readonly createdAt: string;
|
|
1020
|
+
readonly receivedAt: string | null;
|
|
1021
|
+
readonly processedAt: string | null;
|
|
1022
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
1023
|
+
export declare const remove: (input: {
|
|
1024
|
+
readonly id: string;
|
|
1025
|
+
}) => import("effect/Effect").Effect<{
|
|
1026
|
+
readonly success: boolean;
|
|
1027
|
+
readonly message: string;
|
|
1028
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
1029
|
+
export declare const getStatus: (input: {
|
|
1030
|
+
readonly id: string;
|
|
1031
|
+
}) => import("effect/Effect").Effect<{
|
|
1032
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
1033
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
1034
|
+
readonly updatedAt: string;
|
|
1035
|
+
}, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|
|
1036
|
+
export declare const getEvents: (input: {
|
|
1037
|
+
readonly id: string;
|
|
1038
|
+
}) => import("effect/Effect").Effect<readonly {
|
|
1039
|
+
readonly id: string & import("effect/Brand").Brand<"MessageEventId">;
|
|
1040
|
+
readonly status: string;
|
|
1041
|
+
readonly messageId: string & import("effect/Brand").Brand<"MessageId">;
|
|
1042
|
+
readonly timestamp: string;
|
|
1043
|
+
readonly eventType: string;
|
|
1044
|
+
readonly metadata?: {
|
|
1045
|
+
readonly [x: string]: import("./generated").JsonValue;
|
|
1046
|
+
} | null;
|
|
1047
|
+
}[], import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
|