@openemail/sdk 0.0.2 → 0.0.4
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/index.cjs +112 -8
- package/index.d.cts +260 -65
- package/index.d.ts +260 -65
- package/index.js +111 -9
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -132,6 +132,7 @@ type AudienceCreate = {
|
|
|
132
132
|
type AudienceGrowthBucket = {
|
|
133
133
|
bucket: string;
|
|
134
134
|
added: number;
|
|
135
|
+
unsubscribed: number;
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
declare const HIT_KINDS: {
|
|
@@ -160,15 +161,19 @@ type AudienceGrowthSeries = {
|
|
|
160
161
|
name: string;
|
|
161
162
|
builtin: boolean;
|
|
162
163
|
total: number;
|
|
164
|
+
subscribed: number;
|
|
163
165
|
before: number;
|
|
164
166
|
added: number;
|
|
167
|
+
unsubscribed: number;
|
|
165
168
|
buckets: Array<AudienceGrowthBucket>;
|
|
166
169
|
};
|
|
167
170
|
|
|
168
171
|
type AudienceGrowthTotals = {
|
|
169
172
|
contacts: number;
|
|
173
|
+
subscribed: number;
|
|
170
174
|
memberships: number;
|
|
171
175
|
added: number;
|
|
176
|
+
unsubscribed: number;
|
|
172
177
|
lists: number;
|
|
173
178
|
busiest: string | null;
|
|
174
179
|
};
|
|
@@ -300,12 +305,30 @@ type BroadcastPreviewResource = {
|
|
|
300
305
|
suppressed: number;
|
|
301
306
|
};
|
|
302
307
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
type BroadcastRecipientResource = {
|
|
309
|
+
object: 'broadcast_recipient';
|
|
310
|
+
emailId: string;
|
|
311
|
+
contactId: string | null;
|
|
312
|
+
email: string;
|
|
313
|
+
name: string | null;
|
|
314
|
+
status: string;
|
|
315
|
+
sentAt: string | null;
|
|
316
|
+
deliveredAt: string | null;
|
|
317
|
+
bouncedAt: string | null;
|
|
318
|
+
complainedAt: string | null;
|
|
319
|
+
failure: string | null;
|
|
320
|
+
opens: number;
|
|
321
|
+
firstOpenAt: string | null;
|
|
322
|
+
clicks: number;
|
|
323
|
+
firstClickAt: string | null;
|
|
324
|
+
unsubscribedAt: string | null;
|
|
306
325
|
};
|
|
307
326
|
|
|
308
|
-
type
|
|
327
|
+
type BroadcastRecipientContentResource = BroadcastRecipientResource & {
|
|
328
|
+
subject: string;
|
|
329
|
+
html: string | null;
|
|
330
|
+
text: string | null;
|
|
331
|
+
};
|
|
309
332
|
|
|
310
333
|
declare const BROADCAST_STATUSES: {
|
|
311
334
|
readonly SCHEDULED: "scheduled";
|
|
@@ -315,6 +338,33 @@ declare const BROADCAST_STATUSES: {
|
|
|
315
338
|
readonly CANCELLED: "cancelled";
|
|
316
339
|
readonly FAILED: "failed";
|
|
317
340
|
};
|
|
341
|
+
interface BroadcastRecipientFilters {
|
|
342
|
+
PENDING: 'pending';
|
|
343
|
+
SENT: 'sent';
|
|
344
|
+
DELIVERED: 'delivered';
|
|
345
|
+
OPENED: 'opened';
|
|
346
|
+
NOT_OPENED: 'not_opened';
|
|
347
|
+
CLICKED: 'clicked';
|
|
348
|
+
BOUNCED: 'bounced';
|
|
349
|
+
COMPLAINED: 'complained';
|
|
350
|
+
FAILED: 'failed';
|
|
351
|
+
UNSUBSCRIBED: 'unsubscribed';
|
|
352
|
+
}
|
|
353
|
+
declare const BROADCAST_RECIPIENT_FILTERS: BroadcastRecipientFilters;
|
|
354
|
+
|
|
355
|
+
type BroadcastRecipientFilter = BroadcastRecipientFilters[keyof BroadcastRecipientFilters];
|
|
356
|
+
|
|
357
|
+
type BroadcastRecipientListOptions = ListOptions & {
|
|
358
|
+
filter?: BroadcastRecipientFilter;
|
|
359
|
+
q?: string;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
declare const API_KEY_MODES: {
|
|
363
|
+
readonly LIVE: "live";
|
|
364
|
+
readonly TEST: "test";
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
type ApiKeyMode = (typeof API_KEY_MODES)[keyof typeof API_KEY_MODES];
|
|
318
368
|
|
|
319
369
|
type BroadcastStatus = (typeof BROADCAST_STATUSES)[keyof typeof BROADCAST_STATUSES];
|
|
320
370
|
|
|
@@ -380,6 +430,40 @@ type BroadcastResource = {
|
|
|
380
430
|
updatedAt: string;
|
|
381
431
|
};
|
|
382
432
|
|
|
433
|
+
type BroadcastStatsOptions = RequestScope & {
|
|
434
|
+
grain?: TrackingGrain;
|
|
435
|
+
offsetMinutes?: number;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
type BroadcastStatsTotals = {
|
|
439
|
+
recipients: number;
|
|
440
|
+
pending: number;
|
|
441
|
+
sent: number;
|
|
442
|
+
delivered: number;
|
|
443
|
+
bounced: number;
|
|
444
|
+
complained: number;
|
|
445
|
+
failed: number;
|
|
446
|
+
opened: number;
|
|
447
|
+
clicked: number;
|
|
448
|
+
unsubscribed: number;
|
|
449
|
+
opens: number;
|
|
450
|
+
clicks: number;
|
|
451
|
+
};
|
|
452
|
+
type BroadcastStatsBucket = {
|
|
453
|
+
bucket: string;
|
|
454
|
+
delivered: number;
|
|
455
|
+
opened: number;
|
|
456
|
+
clicked: number;
|
|
457
|
+
unsubscribed: number;
|
|
458
|
+
};
|
|
459
|
+
type BroadcastStatsResource = {
|
|
460
|
+
object: 'broadcast_stats';
|
|
461
|
+
broadcastId: string;
|
|
462
|
+
grain: TrackingGrain;
|
|
463
|
+
totals: BroadcastStatsTotals;
|
|
464
|
+
series: Array<BroadcastStatsBucket>;
|
|
465
|
+
};
|
|
466
|
+
|
|
383
467
|
type SentBroadcastResource = BroadcastResource & {
|
|
384
468
|
replayed: boolean;
|
|
385
469
|
};
|
|
@@ -454,40 +538,43 @@ type CalendarRangeOptions = ListOptions & {
|
|
|
454
538
|
timezone?: string;
|
|
455
539
|
};
|
|
456
540
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
541
|
+
interface ApiScopes {
|
|
542
|
+
EMAILS_SEND: 'emails:send';
|
|
543
|
+
EMAILS_READ: 'emails:read';
|
|
544
|
+
DRAFTS_READ: 'drafts:read';
|
|
545
|
+
DRAFTS_WRITE: 'drafts:write';
|
|
546
|
+
THREADS_READ: 'threads:read';
|
|
547
|
+
THREADS_WRITE: 'threads:write';
|
|
548
|
+
FILES_READ: 'files:read';
|
|
549
|
+
FILES_WRITE: 'files:write';
|
|
550
|
+
LABELS_READ: 'labels:read';
|
|
551
|
+
LABELS_WRITE: 'labels:write';
|
|
552
|
+
CONTACTS_READ: 'contacts:read';
|
|
553
|
+
CONTACTS_WRITE: 'contacts:write';
|
|
554
|
+
AUDIENCES_READ: 'audiences:read';
|
|
555
|
+
AUDIENCES_WRITE: 'audiences:write';
|
|
556
|
+
CALENDAR_READ: 'calendar:read';
|
|
557
|
+
CALENDAR_WRITE: 'calendar:write';
|
|
558
|
+
TEMPLATES_READ: 'templates:read';
|
|
559
|
+
TEMPLATES_WRITE: 'templates:write';
|
|
560
|
+
DOMAINS_READ: 'domains:read';
|
|
561
|
+
DOMAINS_WRITE: 'domains:write';
|
|
562
|
+
WEBHOOKS_READ: 'webhooks:read';
|
|
563
|
+
WEBHOOKS_WRITE: 'webhooks:write';
|
|
564
|
+
RULES_READ: 'rules:read';
|
|
565
|
+
RULES_WRITE: 'rules:write';
|
|
566
|
+
CONNECTIONS_READ: 'connections:read';
|
|
567
|
+
MEMBERS_READ: 'members:read';
|
|
568
|
+
MEMBERS_WRITE: 'members:write';
|
|
569
|
+
ROLES_READ: 'roles:read';
|
|
570
|
+
ROLES_WRITE: 'roles:write';
|
|
571
|
+
SETTINGS_READ: 'settings:read';
|
|
572
|
+
SETTINGS_WRITE: 'settings:write';
|
|
573
|
+
KEYS_WRITE: 'keys:write';
|
|
574
|
+
KEYS_READ: 'keys:read';
|
|
575
|
+
KEYS_MANAGE: 'keys:manage';
|
|
576
|
+
}
|
|
577
|
+
declare const API_SCOPES: ApiScopes;
|
|
491
578
|
declare const CONSOLE_PERMISSIONS: {
|
|
492
579
|
readonly API_KEYS_READ: "api-keys:read";
|
|
493
580
|
readonly API_KEYS_WRITE: "api-keys:write";
|
|
@@ -496,7 +583,7 @@ declare const CONSOLE_PERMISSIONS: {
|
|
|
496
583
|
readonly WORKSPACE_MANAGE: "workspace:manage";
|
|
497
584
|
};
|
|
498
585
|
|
|
499
|
-
type ApiScope =
|
|
586
|
+
type ApiScope = ApiScopes[keyof ApiScopes];
|
|
500
587
|
|
|
501
588
|
type InlineAttachmentInput = {
|
|
502
589
|
filename: string;
|
|
@@ -863,6 +950,11 @@ declare const Broadcasts: (transport: Transport) => {
|
|
|
863
950
|
listAll: (options?: BroadcastListOptions) => Promise<Array<BroadcastResource>>;
|
|
864
951
|
iterate: (options?: BroadcastListOptions) => AsyncGenerator<BroadcastResource, void, undefined>;
|
|
865
952
|
get: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
|
|
953
|
+
listRecipients: (id: string, options?: BroadcastRecipientListOptions) => Promise<Page<BroadcastRecipientResource>>;
|
|
954
|
+
listAllRecipients: (id: string, options?: BroadcastRecipientListOptions) => Promise<Array<BroadcastRecipientResource>>;
|
|
955
|
+
iterateRecipients: (id: string, options?: BroadcastRecipientListOptions) => AsyncGenerator<BroadcastRecipientResource, void, undefined>;
|
|
956
|
+
getRecipient: (id: string, emailId: string, options?: RequestScope) => Promise<BroadcastRecipientContentResource>;
|
|
957
|
+
stats: (id: string, options?: BroadcastStatsOptions) => Promise<BroadcastStatsResource>;
|
|
866
958
|
cancel: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
|
|
867
959
|
};
|
|
868
960
|
|
|
@@ -937,11 +1029,16 @@ declare const Files: (transport: Transport) => {
|
|
|
937
1029
|
listAll: (options?: FileListOptions) => Promise<Array<FileResource>>;
|
|
938
1030
|
iterate: (options?: FileListOptions) => AsyncGenerator<FileResource, void, undefined>;
|
|
939
1031
|
get: (id: string, options?: RequestScope) => Promise<FileResource>;
|
|
1032
|
+
stats: (options?: RequestScope) => Promise<FileStatsResource>;
|
|
940
1033
|
download: (id: string, options?: RequestScope) => Promise<Uint8Array>;
|
|
941
1034
|
listLinks: (id: string, options?: ListOptions) => Promise<Page<FileLinkResource>>;
|
|
942
1035
|
listAllLinks: (id: string, options?: ListOptions) => Promise<Array<FileLinkResource>>;
|
|
943
1036
|
iterateLinks: (id: string, options?: ListOptions) => AsyncGenerator<FileLinkResource, void, undefined>;
|
|
1037
|
+
createLink: (id: string, options?: FileLinkCreateOptions) => Promise<FileLinkResource>;
|
|
1038
|
+
revokeLink: (id: string, linkId: string, options?: RequestScope) => Promise<FileLinkResource>;
|
|
1039
|
+
upload: (data: RawBody, options: FileUploadOptions) => Promise<FileResource>;
|
|
944
1040
|
delete: (id: string, options?: RequestScope) => Promise<DeletedFileResource>;
|
|
1041
|
+
deleteMany: (ids: Array<string>, options?: RequestScope) => Promise<FileBatchDeleteResource>;
|
|
945
1042
|
};
|
|
946
1043
|
|
|
947
1044
|
declare const Imports: (transport: Transport) => {
|
|
@@ -1220,6 +1317,7 @@ type RequestOptions = {
|
|
|
1220
1317
|
repeatable?: boolean;
|
|
1221
1318
|
accept?: string;
|
|
1222
1319
|
binary?: boolean;
|
|
1320
|
+
timeoutMs?: number;
|
|
1223
1321
|
};
|
|
1224
1322
|
|
|
1225
1323
|
type SendScope = RequestScope & {
|
|
@@ -1572,6 +1670,12 @@ type DeletedFileResource = {
|
|
|
1572
1670
|
deleted: true;
|
|
1573
1671
|
};
|
|
1574
1672
|
|
|
1673
|
+
type FileAddressCount = {
|
|
1674
|
+
address: string;
|
|
1675
|
+
files: number;
|
|
1676
|
+
bytes: number;
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1575
1679
|
declare const FILE_SORTS: {
|
|
1576
1680
|
readonly NEWEST: "newest";
|
|
1577
1681
|
readonly OLDEST: "oldest";
|
|
@@ -1588,12 +1692,56 @@ declare const FILE_KINDS: {
|
|
|
1588
1692
|
declare const FILE_DIRECTIONS: {
|
|
1589
1693
|
readonly INBOUND: "inbound";
|
|
1590
1694
|
readonly OUTBOUND: "outbound";
|
|
1695
|
+
readonly UPLOADED: "uploaded";
|
|
1696
|
+
};
|
|
1697
|
+
interface FileUsages {
|
|
1698
|
+
RECEIVED: 'received';
|
|
1699
|
+
SENT: 'sent';
|
|
1700
|
+
LINKED: 'linked';
|
|
1701
|
+
SCHEDULED: 'scheduled';
|
|
1702
|
+
}
|
|
1703
|
+
type FileUsage = FileUsages[keyof FileUsages];
|
|
1704
|
+
declare const FILE_USAGES: FileUsages;
|
|
1705
|
+
|
|
1706
|
+
type FileKept = {
|
|
1707
|
+
id: string;
|
|
1708
|
+
filename: string;
|
|
1709
|
+
usage: FileUsage;
|
|
1710
|
+
reason: string;
|
|
1711
|
+
};
|
|
1712
|
+
|
|
1713
|
+
type FileBatchDeleteResource = {
|
|
1714
|
+
object: 'file_batch_delete';
|
|
1715
|
+
deleted: Array<string>;
|
|
1716
|
+
kept: Array<FileKept>;
|
|
1717
|
+
missing: Array<string>;
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
type FileCount = {
|
|
1721
|
+
files: number;
|
|
1722
|
+
bytes: number;
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
type FileDayCount = {
|
|
1726
|
+
day: string;
|
|
1727
|
+
files: number;
|
|
1728
|
+
bytes: number;
|
|
1591
1729
|
};
|
|
1592
1730
|
|
|
1593
1731
|
type FileDirection = (typeof FILE_DIRECTIONS)[keyof typeof FILE_DIRECTIONS];
|
|
1594
1732
|
|
|
1595
1733
|
type FileKind = (typeof FILE_KINDS)[keyof typeof FILE_KINDS];
|
|
1596
1734
|
|
|
1735
|
+
type FileLinkCount = {
|
|
1736
|
+
shares: number;
|
|
1737
|
+
downloads: number;
|
|
1738
|
+
lastDownloadAt: string | null;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
type FileLinkCreateOptions = RequestScope & {
|
|
1742
|
+
domain?: string;
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1597
1745
|
type FileLinkResource = {
|
|
1598
1746
|
object: 'file_link';
|
|
1599
1747
|
id: string;
|
|
@@ -1603,6 +1751,7 @@ type FileLinkResource = {
|
|
|
1603
1751
|
sizeBytes: number;
|
|
1604
1752
|
host: string | null;
|
|
1605
1753
|
url: string;
|
|
1754
|
+
published: boolean;
|
|
1606
1755
|
downloads: number;
|
|
1607
1756
|
lastDownloadAt: string | null;
|
|
1608
1757
|
revokedAt: string | null;
|
|
@@ -1614,6 +1763,10 @@ type FileSort = (typeof FILE_SORTS)[keyof typeof FILE_SORTS];
|
|
|
1614
1763
|
type FileListOptions = ListOptions & {
|
|
1615
1764
|
q?: string;
|
|
1616
1765
|
kind?: FileKind;
|
|
1766
|
+
direction?: FileDirection;
|
|
1767
|
+
address?: string;
|
|
1768
|
+
since?: Date | string;
|
|
1769
|
+
until?: Date | string;
|
|
1617
1770
|
sort?: FileSort;
|
|
1618
1771
|
};
|
|
1619
1772
|
|
|
@@ -1627,9 +1780,35 @@ type FileResource = {
|
|
|
1627
1780
|
threadId: string | null;
|
|
1628
1781
|
messageId: string | null;
|
|
1629
1782
|
deliveredTo: string | null;
|
|
1783
|
+
usage: FileUsage | null;
|
|
1784
|
+
deletable: boolean;
|
|
1630
1785
|
createdAt: string;
|
|
1631
1786
|
};
|
|
1632
1787
|
|
|
1788
|
+
type FileTypeCount = {
|
|
1789
|
+
mimeType: string;
|
|
1790
|
+
files: number;
|
|
1791
|
+
bytes: number;
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
type FileStatsResource = {
|
|
1795
|
+
object: 'file_stats';
|
|
1796
|
+
totals: FileCount;
|
|
1797
|
+
received: FileCount;
|
|
1798
|
+
sent: FileCount;
|
|
1799
|
+
uploaded: FileCount;
|
|
1800
|
+
types: Array<FileTypeCount>;
|
|
1801
|
+
byDay: Array<FileDayCount>;
|
|
1802
|
+
addresses: Array<FileAddressCount>;
|
|
1803
|
+
links: FileLinkCount;
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
type FileUploadOptions = RequestScope & {
|
|
1807
|
+
filename: string;
|
|
1808
|
+
contentType?: string;
|
|
1809
|
+
timeoutMs?: number;
|
|
1810
|
+
};
|
|
1811
|
+
|
|
1633
1812
|
type ImportChunkResource = {
|
|
1634
1813
|
object: 'import_chunk';
|
|
1635
1814
|
file: number;
|
|
@@ -3072,28 +3251,31 @@ type TrackingStatsResource = {
|
|
|
3072
3251
|
}>;
|
|
3073
3252
|
};
|
|
3074
3253
|
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3254
|
+
interface WebhookEvents {
|
|
3255
|
+
EMAIL_RECEIVED: 'email.received';
|
|
3256
|
+
EMAIL_REPLIED: 'email.replied';
|
|
3257
|
+
EMAIL_SENT: 'email.sent';
|
|
3258
|
+
EMAIL_FAILED: 'email.failed';
|
|
3259
|
+
EMAIL_CANCELLED: 'email.cancelled';
|
|
3260
|
+
EMAIL_SCHEDULED: 'email.scheduled';
|
|
3261
|
+
EMAIL_QUEUED: 'email.queued';
|
|
3262
|
+
EMAIL_DELIVERED: 'email.delivered';
|
|
3263
|
+
EMAIL_DELIVERY_DELAYED: 'email.delivery_delayed';
|
|
3264
|
+
EMAIL_BOUNCED: 'email.bounced';
|
|
3265
|
+
EMAIL_COMPLAINED: 'email.complained';
|
|
3266
|
+
EMAIL_SUPPRESSED: 'email.suppressed';
|
|
3267
|
+
EMAIL_OPENED: 'email.opened';
|
|
3268
|
+
EMAIL_CLICKED: 'email.clicked';
|
|
3269
|
+
EMAIL_DOWNLOADED: 'email.downloaded';
|
|
3270
|
+
DOMAIN_VERIFIED: 'domain.verified';
|
|
3271
|
+
DOMAIN_SENDING_CHANGED: 'domain.sending_changed';
|
|
3272
|
+
DOMAIN_DELETED: 'domain.deleted';
|
|
3273
|
+
SUPPRESSION_ADDED: 'suppression.added';
|
|
3274
|
+
SUPPRESSION_REMOVED: 'suppression.removed';
|
|
3275
|
+
FILE_UPLOADED: 'file.uploaded';
|
|
3276
|
+
FILE_DELETED: 'file.deleted';
|
|
3277
|
+
}
|
|
3278
|
+
declare const WEBHOOK_EVENTS: WebhookEvents;
|
|
3097
3279
|
declare const WEBHOOK_DELIVERY_STATUSES: {
|
|
3098
3280
|
readonly DELIVERED: "delivered";
|
|
3099
3281
|
readonly FAILED: "failed";
|
|
@@ -3119,7 +3301,7 @@ declare const WEBHOOK_REPLAY_ERROR_CODES: {
|
|
|
3119
3301
|
readonly REPLAY_IN_PROGRESS: "replay_in_progress";
|
|
3120
3302
|
};
|
|
3121
3303
|
|
|
3122
|
-
type WebhookEvent =
|
|
3304
|
+
type WebhookEvent = WebhookEvents[keyof WebhookEvents];
|
|
3123
3305
|
|
|
3124
3306
|
type WebhookResource = {
|
|
3125
3307
|
object: 'webhook';
|
|
@@ -3187,6 +3369,19 @@ type EmailDownloadedData = Omit<EmailOpenedData, 'recipient' | 'attributed' | 'o
|
|
|
3187
3369
|
downloadedAt: string;
|
|
3188
3370
|
};
|
|
3189
3371
|
|
|
3372
|
+
type FileEventData = {
|
|
3373
|
+
fileId: string;
|
|
3374
|
+
filename: string;
|
|
3375
|
+
mimeType: string;
|
|
3376
|
+
sizeBytes: number;
|
|
3377
|
+
direction: FileDirection;
|
|
3378
|
+
to: string | null;
|
|
3379
|
+
threadId: string | null;
|
|
3380
|
+
messageId: string | null;
|
|
3381
|
+
uploadedAt?: string;
|
|
3382
|
+
deletedAt?: string;
|
|
3383
|
+
};
|
|
3384
|
+
|
|
3190
3385
|
type WebhookSignatureHeaders = Record<string, string | Array<string> | undefined>;
|
|
3191
3386
|
|
|
3192
3387
|
type VerifyWebhookProps = {
|
|
@@ -3326,7 +3521,7 @@ declare class Transport {
|
|
|
3326
3521
|
readonly baseUrl: string;
|
|
3327
3522
|
private readonly fetchImpl;
|
|
3328
3523
|
private readonly maxRetries;
|
|
3329
|
-
|
|
3524
|
+
readonly timeoutMs: number;
|
|
3330
3525
|
private readonly userAgent;
|
|
3331
3526
|
private readonly headers;
|
|
3332
3527
|
constructor(options: TransportOptions & {
|
|
@@ -3405,5 +3600,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
|
|
|
3405
3600
|
declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
|
|
3406
3601
|
declare const isRtlLanguage: (code: string | null | undefined) => boolean;
|
|
3407
3602
|
|
|
3408
|
-
export { API_SCOPES, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3409
|
-
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastResource, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainDetailResource, DomainPatch, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileDirection, FileKind, FileLinkResource, FileListOptions, FileResource, FileSort, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|
|
3603
|
+
export { API_SCOPES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3604
|
+
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastRecipientContentResource, BroadcastRecipientFilter, BroadcastRecipientListOptions, BroadcastRecipientResource, BroadcastResource, BroadcastStatsBucket, BroadcastStatsOptions, BroadcastStatsResource, BroadcastStatsTotals, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainDetailResource, DomainPatch, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileEventData, FileKept, FileKind, FileLinkCount, FileLinkCreateOptions, FileLinkResource, FileListOptions, FileResource, FileSort, FileStatsResource, FileTypeCount, FileUploadOptions, FileUsage, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|