@openemail/sdk 0.0.3 → 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 +61 -2
- package/index.d.cts +178 -64
- package/index.d.ts +178 -64
- package/index.js +61 -3
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -10,8 +10,20 @@ const BROADCAST_STATUSES = {
|
|
|
10
10
|
CANCELLED: 'cancelled',
|
|
11
11
|
FAILED: 'failed'
|
|
12
12
|
};
|
|
13
|
+
const BROADCAST_RECIPIENT_FILTERS = {
|
|
14
|
+
PENDING: 'pending',
|
|
15
|
+
SENT: 'sent',
|
|
16
|
+
DELIVERED: 'delivered',
|
|
17
|
+
OPENED: 'opened',
|
|
18
|
+
NOT_OPENED: 'not_opened',
|
|
19
|
+
CLICKED: 'clicked',
|
|
20
|
+
BOUNCED: 'bounced',
|
|
21
|
+
COMPLAINED: 'complained',
|
|
22
|
+
FAILED: 'failed',
|
|
23
|
+
UNSUBSCRIBED: 'unsubscribed'
|
|
24
|
+
};
|
|
13
25
|
|
|
14
|
-
var version = "0.0.
|
|
26
|
+
var version = "0.0.4";
|
|
15
27
|
|
|
16
28
|
const BUILD_BASE_URL = 'https://api.openemail.uk';
|
|
17
29
|
|
|
@@ -454,6 +466,8 @@ const QUERY_KEYS = {
|
|
|
454
466
|
REASSIGN_TO: 'reassignTo',
|
|
455
467
|
SOURCE: 'source',
|
|
456
468
|
ADDRESS: 'address',
|
|
469
|
+
DIRECTION: 'direction',
|
|
470
|
+
FILTER: 'filter',
|
|
457
471
|
SEARCH: 'search',
|
|
458
472
|
SORT: 'sort',
|
|
459
473
|
PAGE: 'page',
|
|
@@ -567,8 +581,10 @@ const SEGMENTS = {
|
|
|
567
581
|
REVOKE: 'revoke',
|
|
568
582
|
ROTATE: 'rotate',
|
|
569
583
|
ROTATE_SECRET: 'rotate-secret',
|
|
584
|
+
RECIPIENTS: 'recipients',
|
|
570
585
|
SEND: 'send',
|
|
571
586
|
SENDS: 'sends',
|
|
587
|
+
STATS: 'stats',
|
|
572
588
|
SNOOZE: 'snooze',
|
|
573
589
|
START: 'start',
|
|
574
590
|
TEST: 'test',
|
|
@@ -643,6 +659,8 @@ const API_SCOPES = {
|
|
|
643
659
|
DRAFTS_WRITE: 'drafts:write',
|
|
644
660
|
THREADS_READ: 'threads:read',
|
|
645
661
|
THREADS_WRITE: 'threads:write',
|
|
662
|
+
FILES_READ: 'files:read',
|
|
663
|
+
FILES_WRITE: 'files:write',
|
|
646
664
|
LABELS_READ: 'labels:read',
|
|
647
665
|
LABELS_WRITE: 'labels:write',
|
|
648
666
|
CONTACTS_READ: 'contacts:read',
|
|
@@ -704,7 +722,9 @@ const WEBHOOK_EVENTS = {
|
|
|
704
722
|
DOMAIN_SENDING_CHANGED: 'domain.sending_changed',
|
|
705
723
|
DOMAIN_DELETED: 'domain.deleted',
|
|
706
724
|
SUPPRESSION_ADDED: 'suppression.added',
|
|
707
|
-
SUPPRESSION_REMOVED: 'suppression.removed'
|
|
725
|
+
SUPPRESSION_REMOVED: 'suppression.removed',
|
|
726
|
+
FILE_UPLOADED: 'file.uploaded',
|
|
727
|
+
FILE_DELETED: 'file.deleted'
|
|
708
728
|
};
|
|
709
729
|
const WEBHOOK_REPLAY_ERROR_CODES = {
|
|
710
730
|
RESOURCE_NOT_FOUND: 'resource_not_found',
|
|
@@ -1320,6 +1340,7 @@ const AudienceContactsChildPath = (id, segment) => `${AudienceContactsPath(id)}/
|
|
|
1320
1340
|
const AudienceContactPath = (id, email) => `${AudienceContactsPath(id)}/${Segment(email)}`;
|
|
1321
1341
|
const BroadcastPath = (id) => `${PATHS.BROADCASTS}/${Segment(id)}`;
|
|
1322
1342
|
const BroadcastChildPath = (id, segment) => `${BroadcastPath(id)}/${segment}`;
|
|
1343
|
+
const BroadcastRecipientPath = (id, emailId) => `${BroadcastChildPath(id, SEGMENTS.RECIPIENTS)}/${Segment(emailId)}`;
|
|
1323
1344
|
const DomainPath = (id) => `${PATHS.DOMAINS}/${Segment(id)}`;
|
|
1324
1345
|
const WebhookPath = (id) => `${PATHS.WEBHOOKS}/${Segment(id)}`;
|
|
1325
1346
|
const WebhookChildPath = (id, segment) => `${WebhookPath(id)}/${segment}`;
|
|
@@ -1352,6 +1373,7 @@ const MemberInvitationResendPath = (id) => `${MemberInvitationPath(id)}/${SEGMEN
|
|
|
1352
1373
|
const SuppressionPath = (id) => `${PATHS.SUPPRESSIONS}/${Segment(id)}`;
|
|
1353
1374
|
const FilePath = (id) => `${PATHS.FILES}/${Segment(id)}`;
|
|
1354
1375
|
const FileChildPath = (id, segment) => `${FilePath(id)}/${segment}`;
|
|
1376
|
+
const FileLinkPath = (id, linkId) => `${FileChildPath(id, SEGMENTS.LINKS)}/${Segment(linkId)}`;
|
|
1355
1377
|
const TempInboxPath = (id) => `${PATHS.TEMP_MAIL_INBOXES}/${Segment(id)}`;
|
|
1356
1378
|
const TempInboxExtendPath = (id) => `${TempInboxPath(id)}/${SEGMENTS.EXTEND}`;
|
|
1357
1379
|
const TempMessagesPath = (id) => `${TempInboxPath(id)}/${SEGMENTS.MESSAGES}`;
|
|
@@ -1514,6 +1536,11 @@ const ToInstant = Instant;
|
|
|
1514
1536
|
const ListQuery$a = (options) => ({
|
|
1515
1537
|
[QUERY_KEYS.AUDIENCE_ID]: options.audienceId
|
|
1516
1538
|
});
|
|
1539
|
+
const RecipientQuery = (options) => ({
|
|
1540
|
+
[QUERY_KEYS.FILTER]: options.filter,
|
|
1541
|
+
[QUERY_KEYS.Q]: options.q
|
|
1542
|
+
});
|
|
1543
|
+
const RecipientsPath = (id) => BroadcastChildPath(id, SEGMENTS.RECIPIENTS);
|
|
1517
1544
|
const Broadcasts = (transport) => ({
|
|
1518
1545
|
preview: (body, options = {}) => transport.request(PATHS.BROADCASTS_PREVIEW, {
|
|
1519
1546
|
method: HTTP_METHODS.POST,
|
|
@@ -1535,6 +1562,21 @@ const Broadcasts = (transport) => ({
|
|
|
1535
1562
|
listAll: (options = {}) => CollectAll(transport, PATHS.BROADCASTS, CURSOR_STYLES.CURSOR, options, ListQuery$a(options)),
|
|
1536
1563
|
iterate: (options = {}) => IteratePages(transport, PATHS.BROADCASTS, CURSOR_STYLES.CURSOR, options, ListQuery$a(options)),
|
|
1537
1564
|
get: (id, options = {}) => transport.request(BroadcastPath(id), { signal: options.signal, apiKey: options.apiKey }),
|
|
1565
|
+
listRecipients: (id, options = {}) => FetchPage(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1566
|
+
listAllRecipients: (id, options = {}) => CollectAll(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1567
|
+
iterateRecipients: (id, options = {}) => IteratePages(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1568
|
+
getRecipient: (id, emailId, options = {}) => transport.request(BroadcastRecipientPath(id, emailId), {
|
|
1569
|
+
signal: options.signal,
|
|
1570
|
+
apiKey: options.apiKey
|
|
1571
|
+
}),
|
|
1572
|
+
stats: (id, options = {}) => transport.request(BroadcastChildPath(id, SEGMENTS.STATS), {
|
|
1573
|
+
query: {
|
|
1574
|
+
[QUERY_KEYS.GRAIN]: options.grain,
|
|
1575
|
+
[QUERY_KEYS.OFFSET_MINUTES]: options.offsetMinutes
|
|
1576
|
+
},
|
|
1577
|
+
signal: options.signal,
|
|
1578
|
+
apiKey: options.apiKey
|
|
1579
|
+
}),
|
|
1538
1580
|
cancel: (id, options = {}) => transport.request(BroadcastChildPath(id, SEGMENTS.CANCEL), {
|
|
1539
1581
|
method: HTTP_METHODS.POST,
|
|
1540
1582
|
repeatable: true,
|
|
@@ -1783,6 +1825,10 @@ const Emails = (transport) => ({
|
|
|
1783
1825
|
const ListQuery$6 = (options) => ({
|
|
1784
1826
|
[QUERY_KEYS.Q]: options.q,
|
|
1785
1827
|
[QUERY_KEYS.KIND]: options.kind,
|
|
1828
|
+
[QUERY_KEYS.DIRECTION]: options.direction,
|
|
1829
|
+
[QUERY_KEYS.ADDRESS]: options.address,
|
|
1830
|
+
[QUERY_KEYS.SINCE]: ToInstant(options.since),
|
|
1831
|
+
[QUERY_KEYS.UNTIL]: ToInstant(options.until),
|
|
1786
1832
|
[QUERY_KEYS.SORT]: options.sort
|
|
1787
1833
|
});
|
|
1788
1834
|
const UploadName = (options) => {
|
|
@@ -1815,6 +1861,18 @@ const Files = (transport) => ({
|
|
|
1815
1861
|
listLinks: (id, options = {}) => FetchPage(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1816
1862
|
listAllLinks: (id, options = {}) => CollectAll(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1817
1863
|
iterateLinks: (id, options = {}) => IteratePages(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1864
|
+
createLink: (id, options = {}) => transport.request(FileChildPath(id, SEGMENTS.LINKS), {
|
|
1865
|
+
method: HTTP_METHODS.POST,
|
|
1866
|
+
body: options.domain ? { domain: options.domain } : {},
|
|
1867
|
+
signal: options.signal,
|
|
1868
|
+
apiKey: options.apiKey
|
|
1869
|
+
}),
|
|
1870
|
+
revokeLink: (id, linkId, options = {}) => transport.request(FileLinkPath(id, linkId), {
|
|
1871
|
+
method: HTTP_METHODS.DELETE,
|
|
1872
|
+
repeatable: true,
|
|
1873
|
+
signal: options.signal,
|
|
1874
|
+
apiKey: options.apiKey
|
|
1875
|
+
}),
|
|
1818
1876
|
upload: (data, options) => transport.request(PATHS.FILES, {
|
|
1819
1877
|
method: HTTP_METHODS.POST,
|
|
1820
1878
|
query: { [QUERY_KEYS.FILENAME]: UploadName(options) },
|
|
@@ -2793,6 +2851,7 @@ const languageByCode = LanguageByCode;
|
|
|
2793
2851
|
const isRtlLanguage = IsRtlLanguage;
|
|
2794
2852
|
|
|
2795
2853
|
exports.API_SCOPES = API_SCOPES;
|
|
2854
|
+
exports.BROADCAST_RECIPIENT_FILTERS = BROADCAST_RECIPIENT_FILTERS;
|
|
2796
2855
|
exports.BROADCAST_STATUSES = BROADCAST_STATUSES;
|
|
2797
2856
|
exports.CONTACT_BLOCK_LISTS = CONTACT_BLOCK_LISTS;
|
|
2798
2857
|
exports.CONTACT_PHOTO_TYPES = CONTACT_PHOTO_TYPES;
|
package/index.d.cts
CHANGED
|
@@ -305,12 +305,30 @@ type BroadcastPreviewResource = {
|
|
|
305
305
|
suppressed: number;
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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;
|
|
311
325
|
};
|
|
312
326
|
|
|
313
|
-
type
|
|
327
|
+
type BroadcastRecipientContentResource = BroadcastRecipientResource & {
|
|
328
|
+
subject: string;
|
|
329
|
+
html: string | null;
|
|
330
|
+
text: string | null;
|
|
331
|
+
};
|
|
314
332
|
|
|
315
333
|
declare const BROADCAST_STATUSES: {
|
|
316
334
|
readonly SCHEDULED: "scheduled";
|
|
@@ -320,6 +338,33 @@ declare const BROADCAST_STATUSES: {
|
|
|
320
338
|
readonly CANCELLED: "cancelled";
|
|
321
339
|
readonly FAILED: "failed";
|
|
322
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];
|
|
323
368
|
|
|
324
369
|
type BroadcastStatus = (typeof BROADCAST_STATUSES)[keyof typeof BROADCAST_STATUSES];
|
|
325
370
|
|
|
@@ -385,6 +430,40 @@ type BroadcastResource = {
|
|
|
385
430
|
updatedAt: string;
|
|
386
431
|
};
|
|
387
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
|
+
|
|
388
467
|
type SentBroadcastResource = BroadcastResource & {
|
|
389
468
|
replayed: boolean;
|
|
390
469
|
};
|
|
@@ -459,40 +538,43 @@ type CalendarRangeOptions = ListOptions & {
|
|
|
459
538
|
timezone?: string;
|
|
460
539
|
};
|
|
461
540
|
|
|
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
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
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;
|
|
496
578
|
declare const CONSOLE_PERMISSIONS: {
|
|
497
579
|
readonly API_KEYS_READ: "api-keys:read";
|
|
498
580
|
readonly API_KEYS_WRITE: "api-keys:write";
|
|
@@ -501,7 +583,7 @@ declare const CONSOLE_PERMISSIONS: {
|
|
|
501
583
|
readonly WORKSPACE_MANAGE: "workspace:manage";
|
|
502
584
|
};
|
|
503
585
|
|
|
504
|
-
type ApiScope =
|
|
586
|
+
type ApiScope = ApiScopes[keyof ApiScopes];
|
|
505
587
|
|
|
506
588
|
type InlineAttachmentInput = {
|
|
507
589
|
filename: string;
|
|
@@ -868,6 +950,11 @@ declare const Broadcasts: (transport: Transport) => {
|
|
|
868
950
|
listAll: (options?: BroadcastListOptions) => Promise<Array<BroadcastResource>>;
|
|
869
951
|
iterate: (options?: BroadcastListOptions) => AsyncGenerator<BroadcastResource, void, undefined>;
|
|
870
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>;
|
|
871
958
|
cancel: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
|
|
872
959
|
};
|
|
873
960
|
|
|
@@ -947,6 +1034,8 @@ declare const Files: (transport: Transport) => {
|
|
|
947
1034
|
listLinks: (id: string, options?: ListOptions) => Promise<Page<FileLinkResource>>;
|
|
948
1035
|
listAllLinks: (id: string, options?: ListOptions) => Promise<Array<FileLinkResource>>;
|
|
949
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>;
|
|
950
1039
|
upload: (data: RawBody, options: FileUploadOptions) => Promise<FileResource>;
|
|
951
1040
|
delete: (id: string, options?: RequestScope) => Promise<DeletedFileResource>;
|
|
952
1041
|
deleteMany: (ids: Array<string>, options?: RequestScope) => Promise<FileBatchDeleteResource>;
|
|
@@ -1649,6 +1738,10 @@ type FileLinkCount = {
|
|
|
1649
1738
|
lastDownloadAt: string | null;
|
|
1650
1739
|
};
|
|
1651
1740
|
|
|
1741
|
+
type FileLinkCreateOptions = RequestScope & {
|
|
1742
|
+
domain?: string;
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1652
1745
|
type FileLinkResource = {
|
|
1653
1746
|
object: 'file_link';
|
|
1654
1747
|
id: string;
|
|
@@ -1658,6 +1751,7 @@ type FileLinkResource = {
|
|
|
1658
1751
|
sizeBytes: number;
|
|
1659
1752
|
host: string | null;
|
|
1660
1753
|
url: string;
|
|
1754
|
+
published: boolean;
|
|
1661
1755
|
downloads: number;
|
|
1662
1756
|
lastDownloadAt: string | null;
|
|
1663
1757
|
revokedAt: string | null;
|
|
@@ -1669,6 +1763,10 @@ type FileSort = (typeof FILE_SORTS)[keyof typeof FILE_SORTS];
|
|
|
1669
1763
|
type FileListOptions = ListOptions & {
|
|
1670
1764
|
q?: string;
|
|
1671
1765
|
kind?: FileKind;
|
|
1766
|
+
direction?: FileDirection;
|
|
1767
|
+
address?: string;
|
|
1768
|
+
since?: Date | string;
|
|
1769
|
+
until?: Date | string;
|
|
1672
1770
|
sort?: FileSort;
|
|
1673
1771
|
};
|
|
1674
1772
|
|
|
@@ -3153,28 +3251,31 @@ type TrackingStatsResource = {
|
|
|
3153
3251
|
}>;
|
|
3154
3252
|
};
|
|
3155
3253
|
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
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;
|
|
3178
3279
|
declare const WEBHOOK_DELIVERY_STATUSES: {
|
|
3179
3280
|
readonly DELIVERED: "delivered";
|
|
3180
3281
|
readonly FAILED: "failed";
|
|
@@ -3200,7 +3301,7 @@ declare const WEBHOOK_REPLAY_ERROR_CODES: {
|
|
|
3200
3301
|
readonly REPLAY_IN_PROGRESS: "replay_in_progress";
|
|
3201
3302
|
};
|
|
3202
3303
|
|
|
3203
|
-
type WebhookEvent =
|
|
3304
|
+
type WebhookEvent = WebhookEvents[keyof WebhookEvents];
|
|
3204
3305
|
|
|
3205
3306
|
type WebhookResource = {
|
|
3206
3307
|
object: 'webhook';
|
|
@@ -3268,6 +3369,19 @@ type EmailDownloadedData = Omit<EmailOpenedData, 'recipient' | 'attributed' | 'o
|
|
|
3268
3369
|
downloadedAt: string;
|
|
3269
3370
|
};
|
|
3270
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
|
+
|
|
3271
3385
|
type WebhookSignatureHeaders = Record<string, string | Array<string> | undefined>;
|
|
3272
3386
|
|
|
3273
3387
|
type VerifyWebhookProps = {
|
|
@@ -3486,5 +3600,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
|
|
|
3486
3600
|
declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
|
|
3487
3601
|
declare const isRtlLanguage: (code: string | null | undefined) => boolean;
|
|
3488
3602
|
|
|
3489
|
-
export { API_SCOPES, 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 };
|
|
3490
|
-
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, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileKept, FileKind, FileLinkCount, 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 };
|
|
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 };
|
package/index.d.ts
CHANGED
|
@@ -305,12 +305,30 @@ type BroadcastPreviewResource = {
|
|
|
305
305
|
suppressed: number;
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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;
|
|
311
325
|
};
|
|
312
326
|
|
|
313
|
-
type
|
|
327
|
+
type BroadcastRecipientContentResource = BroadcastRecipientResource & {
|
|
328
|
+
subject: string;
|
|
329
|
+
html: string | null;
|
|
330
|
+
text: string | null;
|
|
331
|
+
};
|
|
314
332
|
|
|
315
333
|
declare const BROADCAST_STATUSES: {
|
|
316
334
|
readonly SCHEDULED: "scheduled";
|
|
@@ -320,6 +338,33 @@ declare const BROADCAST_STATUSES: {
|
|
|
320
338
|
readonly CANCELLED: "cancelled";
|
|
321
339
|
readonly FAILED: "failed";
|
|
322
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];
|
|
323
368
|
|
|
324
369
|
type BroadcastStatus = (typeof BROADCAST_STATUSES)[keyof typeof BROADCAST_STATUSES];
|
|
325
370
|
|
|
@@ -385,6 +430,40 @@ type BroadcastResource = {
|
|
|
385
430
|
updatedAt: string;
|
|
386
431
|
};
|
|
387
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
|
+
|
|
388
467
|
type SentBroadcastResource = BroadcastResource & {
|
|
389
468
|
replayed: boolean;
|
|
390
469
|
};
|
|
@@ -459,40 +538,43 @@ type CalendarRangeOptions = ListOptions & {
|
|
|
459
538
|
timezone?: string;
|
|
460
539
|
};
|
|
461
540
|
|
|
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
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
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;
|
|
496
578
|
declare const CONSOLE_PERMISSIONS: {
|
|
497
579
|
readonly API_KEYS_READ: "api-keys:read";
|
|
498
580
|
readonly API_KEYS_WRITE: "api-keys:write";
|
|
@@ -501,7 +583,7 @@ declare const CONSOLE_PERMISSIONS: {
|
|
|
501
583
|
readonly WORKSPACE_MANAGE: "workspace:manage";
|
|
502
584
|
};
|
|
503
585
|
|
|
504
|
-
type ApiScope =
|
|
586
|
+
type ApiScope = ApiScopes[keyof ApiScopes];
|
|
505
587
|
|
|
506
588
|
type InlineAttachmentInput = {
|
|
507
589
|
filename: string;
|
|
@@ -868,6 +950,11 @@ declare const Broadcasts: (transport: Transport) => {
|
|
|
868
950
|
listAll: (options?: BroadcastListOptions) => Promise<Array<BroadcastResource>>;
|
|
869
951
|
iterate: (options?: BroadcastListOptions) => AsyncGenerator<BroadcastResource, void, undefined>;
|
|
870
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>;
|
|
871
958
|
cancel: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
|
|
872
959
|
};
|
|
873
960
|
|
|
@@ -947,6 +1034,8 @@ declare const Files: (transport: Transport) => {
|
|
|
947
1034
|
listLinks: (id: string, options?: ListOptions) => Promise<Page<FileLinkResource>>;
|
|
948
1035
|
listAllLinks: (id: string, options?: ListOptions) => Promise<Array<FileLinkResource>>;
|
|
949
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>;
|
|
950
1039
|
upload: (data: RawBody, options: FileUploadOptions) => Promise<FileResource>;
|
|
951
1040
|
delete: (id: string, options?: RequestScope) => Promise<DeletedFileResource>;
|
|
952
1041
|
deleteMany: (ids: Array<string>, options?: RequestScope) => Promise<FileBatchDeleteResource>;
|
|
@@ -1649,6 +1738,10 @@ type FileLinkCount = {
|
|
|
1649
1738
|
lastDownloadAt: string | null;
|
|
1650
1739
|
};
|
|
1651
1740
|
|
|
1741
|
+
type FileLinkCreateOptions = RequestScope & {
|
|
1742
|
+
domain?: string;
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1652
1745
|
type FileLinkResource = {
|
|
1653
1746
|
object: 'file_link';
|
|
1654
1747
|
id: string;
|
|
@@ -1658,6 +1751,7 @@ type FileLinkResource = {
|
|
|
1658
1751
|
sizeBytes: number;
|
|
1659
1752
|
host: string | null;
|
|
1660
1753
|
url: string;
|
|
1754
|
+
published: boolean;
|
|
1661
1755
|
downloads: number;
|
|
1662
1756
|
lastDownloadAt: string | null;
|
|
1663
1757
|
revokedAt: string | null;
|
|
@@ -1669,6 +1763,10 @@ type FileSort = (typeof FILE_SORTS)[keyof typeof FILE_SORTS];
|
|
|
1669
1763
|
type FileListOptions = ListOptions & {
|
|
1670
1764
|
q?: string;
|
|
1671
1765
|
kind?: FileKind;
|
|
1766
|
+
direction?: FileDirection;
|
|
1767
|
+
address?: string;
|
|
1768
|
+
since?: Date | string;
|
|
1769
|
+
until?: Date | string;
|
|
1672
1770
|
sort?: FileSort;
|
|
1673
1771
|
};
|
|
1674
1772
|
|
|
@@ -3153,28 +3251,31 @@ type TrackingStatsResource = {
|
|
|
3153
3251
|
}>;
|
|
3154
3252
|
};
|
|
3155
3253
|
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
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;
|
|
3178
3279
|
declare const WEBHOOK_DELIVERY_STATUSES: {
|
|
3179
3280
|
readonly DELIVERED: "delivered";
|
|
3180
3281
|
readonly FAILED: "failed";
|
|
@@ -3200,7 +3301,7 @@ declare const WEBHOOK_REPLAY_ERROR_CODES: {
|
|
|
3200
3301
|
readonly REPLAY_IN_PROGRESS: "replay_in_progress";
|
|
3201
3302
|
};
|
|
3202
3303
|
|
|
3203
|
-
type WebhookEvent =
|
|
3304
|
+
type WebhookEvent = WebhookEvents[keyof WebhookEvents];
|
|
3204
3305
|
|
|
3205
3306
|
type WebhookResource = {
|
|
3206
3307
|
object: 'webhook';
|
|
@@ -3268,6 +3369,19 @@ type EmailDownloadedData = Omit<EmailOpenedData, 'recipient' | 'attributed' | 'o
|
|
|
3268
3369
|
downloadedAt: string;
|
|
3269
3370
|
};
|
|
3270
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
|
+
|
|
3271
3385
|
type WebhookSignatureHeaders = Record<string, string | Array<string> | undefined>;
|
|
3272
3386
|
|
|
3273
3387
|
type VerifyWebhookProps = {
|
|
@@ -3486,5 +3600,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
|
|
|
3486
3600
|
declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
|
|
3487
3601
|
declare const isRtlLanguage: (code: string | null | undefined) => boolean;
|
|
3488
3602
|
|
|
3489
|
-
export { API_SCOPES, 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 };
|
|
3490
|
-
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, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileKept, FileKind, FileLinkCount, 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 };
|
|
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 };
|
package/index.js
CHANGED
|
@@ -6,8 +6,20 @@ const BROADCAST_STATUSES = {
|
|
|
6
6
|
CANCELLED: 'cancelled',
|
|
7
7
|
FAILED: 'failed'
|
|
8
8
|
};
|
|
9
|
+
const BROADCAST_RECIPIENT_FILTERS = {
|
|
10
|
+
PENDING: 'pending',
|
|
11
|
+
SENT: 'sent',
|
|
12
|
+
DELIVERED: 'delivered',
|
|
13
|
+
OPENED: 'opened',
|
|
14
|
+
NOT_OPENED: 'not_opened',
|
|
15
|
+
CLICKED: 'clicked',
|
|
16
|
+
BOUNCED: 'bounced',
|
|
17
|
+
COMPLAINED: 'complained',
|
|
18
|
+
FAILED: 'failed',
|
|
19
|
+
UNSUBSCRIBED: 'unsubscribed'
|
|
20
|
+
};
|
|
9
21
|
|
|
10
|
-
var version = "0.0.
|
|
22
|
+
var version = "0.0.4";
|
|
11
23
|
|
|
12
24
|
const BUILD_BASE_URL = 'https://api.openemail.uk';
|
|
13
25
|
|
|
@@ -450,6 +462,8 @@ const QUERY_KEYS = {
|
|
|
450
462
|
REASSIGN_TO: 'reassignTo',
|
|
451
463
|
SOURCE: 'source',
|
|
452
464
|
ADDRESS: 'address',
|
|
465
|
+
DIRECTION: 'direction',
|
|
466
|
+
FILTER: 'filter',
|
|
453
467
|
SEARCH: 'search',
|
|
454
468
|
SORT: 'sort',
|
|
455
469
|
PAGE: 'page',
|
|
@@ -563,8 +577,10 @@ const SEGMENTS = {
|
|
|
563
577
|
REVOKE: 'revoke',
|
|
564
578
|
ROTATE: 'rotate',
|
|
565
579
|
ROTATE_SECRET: 'rotate-secret',
|
|
580
|
+
RECIPIENTS: 'recipients',
|
|
566
581
|
SEND: 'send',
|
|
567
582
|
SENDS: 'sends',
|
|
583
|
+
STATS: 'stats',
|
|
568
584
|
SNOOZE: 'snooze',
|
|
569
585
|
START: 'start',
|
|
570
586
|
TEST: 'test',
|
|
@@ -639,6 +655,8 @@ const API_SCOPES = {
|
|
|
639
655
|
DRAFTS_WRITE: 'drafts:write',
|
|
640
656
|
THREADS_READ: 'threads:read',
|
|
641
657
|
THREADS_WRITE: 'threads:write',
|
|
658
|
+
FILES_READ: 'files:read',
|
|
659
|
+
FILES_WRITE: 'files:write',
|
|
642
660
|
LABELS_READ: 'labels:read',
|
|
643
661
|
LABELS_WRITE: 'labels:write',
|
|
644
662
|
CONTACTS_READ: 'contacts:read',
|
|
@@ -700,7 +718,9 @@ const WEBHOOK_EVENTS = {
|
|
|
700
718
|
DOMAIN_SENDING_CHANGED: 'domain.sending_changed',
|
|
701
719
|
DOMAIN_DELETED: 'domain.deleted',
|
|
702
720
|
SUPPRESSION_ADDED: 'suppression.added',
|
|
703
|
-
SUPPRESSION_REMOVED: 'suppression.removed'
|
|
721
|
+
SUPPRESSION_REMOVED: 'suppression.removed',
|
|
722
|
+
FILE_UPLOADED: 'file.uploaded',
|
|
723
|
+
FILE_DELETED: 'file.deleted'
|
|
704
724
|
};
|
|
705
725
|
const WEBHOOK_REPLAY_ERROR_CODES = {
|
|
706
726
|
RESOURCE_NOT_FOUND: 'resource_not_found',
|
|
@@ -1316,6 +1336,7 @@ const AudienceContactsChildPath = (id, segment) => `${AudienceContactsPath(id)}/
|
|
|
1316
1336
|
const AudienceContactPath = (id, email) => `${AudienceContactsPath(id)}/${Segment(email)}`;
|
|
1317
1337
|
const BroadcastPath = (id) => `${PATHS.BROADCASTS}/${Segment(id)}`;
|
|
1318
1338
|
const BroadcastChildPath = (id, segment) => `${BroadcastPath(id)}/${segment}`;
|
|
1339
|
+
const BroadcastRecipientPath = (id, emailId) => `${BroadcastChildPath(id, SEGMENTS.RECIPIENTS)}/${Segment(emailId)}`;
|
|
1319
1340
|
const DomainPath = (id) => `${PATHS.DOMAINS}/${Segment(id)}`;
|
|
1320
1341
|
const WebhookPath = (id) => `${PATHS.WEBHOOKS}/${Segment(id)}`;
|
|
1321
1342
|
const WebhookChildPath = (id, segment) => `${WebhookPath(id)}/${segment}`;
|
|
@@ -1348,6 +1369,7 @@ const MemberInvitationResendPath = (id) => `${MemberInvitationPath(id)}/${SEGMEN
|
|
|
1348
1369
|
const SuppressionPath = (id) => `${PATHS.SUPPRESSIONS}/${Segment(id)}`;
|
|
1349
1370
|
const FilePath = (id) => `${PATHS.FILES}/${Segment(id)}`;
|
|
1350
1371
|
const FileChildPath = (id, segment) => `${FilePath(id)}/${segment}`;
|
|
1372
|
+
const FileLinkPath = (id, linkId) => `${FileChildPath(id, SEGMENTS.LINKS)}/${Segment(linkId)}`;
|
|
1351
1373
|
const TempInboxPath = (id) => `${PATHS.TEMP_MAIL_INBOXES}/${Segment(id)}`;
|
|
1352
1374
|
const TempInboxExtendPath = (id) => `${TempInboxPath(id)}/${SEGMENTS.EXTEND}`;
|
|
1353
1375
|
const TempMessagesPath = (id) => `${TempInboxPath(id)}/${SEGMENTS.MESSAGES}`;
|
|
@@ -1510,6 +1532,11 @@ const ToInstant = Instant;
|
|
|
1510
1532
|
const ListQuery$a = (options) => ({
|
|
1511
1533
|
[QUERY_KEYS.AUDIENCE_ID]: options.audienceId
|
|
1512
1534
|
});
|
|
1535
|
+
const RecipientQuery = (options) => ({
|
|
1536
|
+
[QUERY_KEYS.FILTER]: options.filter,
|
|
1537
|
+
[QUERY_KEYS.Q]: options.q
|
|
1538
|
+
});
|
|
1539
|
+
const RecipientsPath = (id) => BroadcastChildPath(id, SEGMENTS.RECIPIENTS);
|
|
1513
1540
|
const Broadcasts = (transport) => ({
|
|
1514
1541
|
preview: (body, options = {}) => transport.request(PATHS.BROADCASTS_PREVIEW, {
|
|
1515
1542
|
method: HTTP_METHODS.POST,
|
|
@@ -1531,6 +1558,21 @@ const Broadcasts = (transport) => ({
|
|
|
1531
1558
|
listAll: (options = {}) => CollectAll(transport, PATHS.BROADCASTS, CURSOR_STYLES.CURSOR, options, ListQuery$a(options)),
|
|
1532
1559
|
iterate: (options = {}) => IteratePages(transport, PATHS.BROADCASTS, CURSOR_STYLES.CURSOR, options, ListQuery$a(options)),
|
|
1533
1560
|
get: (id, options = {}) => transport.request(BroadcastPath(id), { signal: options.signal, apiKey: options.apiKey }),
|
|
1561
|
+
listRecipients: (id, options = {}) => FetchPage(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1562
|
+
listAllRecipients: (id, options = {}) => CollectAll(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1563
|
+
iterateRecipients: (id, options = {}) => IteratePages(transport, RecipientsPath(id), CURSOR_STYLES.CURSOR, options, RecipientQuery(options)),
|
|
1564
|
+
getRecipient: (id, emailId, options = {}) => transport.request(BroadcastRecipientPath(id, emailId), {
|
|
1565
|
+
signal: options.signal,
|
|
1566
|
+
apiKey: options.apiKey
|
|
1567
|
+
}),
|
|
1568
|
+
stats: (id, options = {}) => transport.request(BroadcastChildPath(id, SEGMENTS.STATS), {
|
|
1569
|
+
query: {
|
|
1570
|
+
[QUERY_KEYS.GRAIN]: options.grain,
|
|
1571
|
+
[QUERY_KEYS.OFFSET_MINUTES]: options.offsetMinutes
|
|
1572
|
+
},
|
|
1573
|
+
signal: options.signal,
|
|
1574
|
+
apiKey: options.apiKey
|
|
1575
|
+
}),
|
|
1534
1576
|
cancel: (id, options = {}) => transport.request(BroadcastChildPath(id, SEGMENTS.CANCEL), {
|
|
1535
1577
|
method: HTTP_METHODS.POST,
|
|
1536
1578
|
repeatable: true,
|
|
@@ -1779,6 +1821,10 @@ const Emails = (transport) => ({
|
|
|
1779
1821
|
const ListQuery$6 = (options) => ({
|
|
1780
1822
|
[QUERY_KEYS.Q]: options.q,
|
|
1781
1823
|
[QUERY_KEYS.KIND]: options.kind,
|
|
1824
|
+
[QUERY_KEYS.DIRECTION]: options.direction,
|
|
1825
|
+
[QUERY_KEYS.ADDRESS]: options.address,
|
|
1826
|
+
[QUERY_KEYS.SINCE]: ToInstant(options.since),
|
|
1827
|
+
[QUERY_KEYS.UNTIL]: ToInstant(options.until),
|
|
1782
1828
|
[QUERY_KEYS.SORT]: options.sort
|
|
1783
1829
|
});
|
|
1784
1830
|
const UploadName = (options) => {
|
|
@@ -1811,6 +1857,18 @@ const Files = (transport) => ({
|
|
|
1811
1857
|
listLinks: (id, options = {}) => FetchPage(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1812
1858
|
listAllLinks: (id, options = {}) => CollectAll(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1813
1859
|
iterateLinks: (id, options = {}) => IteratePages(transport, FileChildPath(id, SEGMENTS.LINKS), CURSOR_STYLES.CURSOR, options),
|
|
1860
|
+
createLink: (id, options = {}) => transport.request(FileChildPath(id, SEGMENTS.LINKS), {
|
|
1861
|
+
method: HTTP_METHODS.POST,
|
|
1862
|
+
body: options.domain ? { domain: options.domain } : {},
|
|
1863
|
+
signal: options.signal,
|
|
1864
|
+
apiKey: options.apiKey
|
|
1865
|
+
}),
|
|
1866
|
+
revokeLink: (id, linkId, options = {}) => transport.request(FileLinkPath(id, linkId), {
|
|
1867
|
+
method: HTTP_METHODS.DELETE,
|
|
1868
|
+
repeatable: true,
|
|
1869
|
+
signal: options.signal,
|
|
1870
|
+
apiKey: options.apiKey
|
|
1871
|
+
}),
|
|
1814
1872
|
upload: (data, options) => transport.request(PATHS.FILES, {
|
|
1815
1873
|
method: HTTP_METHODS.POST,
|
|
1816
1874
|
query: { [QUERY_KEYS.FILENAME]: UploadName(options) },
|
|
@@ -2788,4 +2846,4 @@ const resolveLanguage = ResolveLanguage;
|
|
|
2788
2846
|
const languageByCode = LanguageByCode;
|
|
2789
2847
|
const isRtlLanguage = IsRtlLanguage;
|
|
2790
2848
|
|
|
2791
|
-
export { API_SCOPES, 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 };
|
|
2849
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openemail/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"author": "OpenEmail",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "The official TypeScript SDK for the OpenEmail API. Send email and broadcasts, work with threads, drafts, labels, templates, rules, webhooks, tracking, contacts, audiences, domains, suppressions, files, API keys, roles, members, mailbox imports and disposable inboxes from code.",
|