@openemail/sdk 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/index.cjs +132 -3
  2. package/index.d.cts +283 -64
  3. package/index.d.ts +283 -64
  4. package/index.js +128 -4
  5. package/package.json +1 -1
package/index.d.cts CHANGED
@@ -50,6 +50,11 @@ declare const AUDIENCE_MEMBER_SORTS: {
50
50
  readonly ADDED_OLDEST: "added-oldest";
51
51
  readonly NAME: "name";
52
52
  };
53
+ interface AudienceMemberStatuses {
54
+ SUBSCRIBED: 'subscribed';
55
+ UNSUBSCRIBED: 'unsubscribed';
56
+ }
57
+ declare const AUDIENCE_MEMBER_STATUSES: AudienceMemberStatuses;
53
58
 
54
59
  type AudienceBuiltin = (typeof AUDIENCE_BUILTINS)[keyof typeof AUDIENCE_BUILTINS];
55
60
 
@@ -59,6 +64,8 @@ type AudienceContactAdd = {
59
64
 
60
65
  type AudienceMemberSort = (typeof AUDIENCE_MEMBER_SORTS)[keyof typeof AUDIENCE_MEMBER_SORTS];
61
66
 
67
+ type AudienceMemberStatus = AudienceMemberStatuses[keyof AudienceMemberStatuses];
68
+
62
69
  declare const CONTACT_SOURCES: {
63
70
  readonly MANUAL: "manual";
64
71
  readonly AUTO: "auto";
@@ -101,6 +108,7 @@ type AudienceContactListOptions = ListOptions & {
101
108
  q?: string;
102
109
  source?: ContactSource;
103
110
  sort?: AudienceMemberSort;
111
+ statuses?: Array<AudienceMemberStatus>;
104
112
  };
105
113
 
106
114
  type ContactResource = {
@@ -305,12 +313,30 @@ type BroadcastPreviewResource = {
305
313
  suppressed: number;
306
314
  };
307
315
 
308
- declare const API_KEY_MODES: {
309
- readonly LIVE: "live";
310
- readonly TEST: "test";
316
+ type BroadcastRecipientResource = {
317
+ object: 'broadcast_recipient';
318
+ emailId: string;
319
+ contactId: string | null;
320
+ email: string;
321
+ name: string | null;
322
+ status: string;
323
+ sentAt: string | null;
324
+ deliveredAt: string | null;
325
+ bouncedAt: string | null;
326
+ complainedAt: string | null;
327
+ failure: string | null;
328
+ opens: number;
329
+ firstOpenAt: string | null;
330
+ clicks: number;
331
+ firstClickAt: string | null;
332
+ unsubscribedAt: string | null;
311
333
  };
312
334
 
313
- type ApiKeyMode = (typeof API_KEY_MODES)[keyof typeof API_KEY_MODES];
335
+ type BroadcastRecipientContentResource = BroadcastRecipientResource & {
336
+ subject: string;
337
+ html: string | null;
338
+ text: string | null;
339
+ };
314
340
 
315
341
  declare const BROADCAST_STATUSES: {
316
342
  readonly SCHEDULED: "scheduled";
@@ -320,6 +346,33 @@ declare const BROADCAST_STATUSES: {
320
346
  readonly CANCELLED: "cancelled";
321
347
  readonly FAILED: "failed";
322
348
  };
349
+ interface BroadcastRecipientFilters {
350
+ PENDING: 'pending';
351
+ SENT: 'sent';
352
+ DELIVERED: 'delivered';
353
+ OPENED: 'opened';
354
+ NOT_OPENED: 'not_opened';
355
+ CLICKED: 'clicked';
356
+ BOUNCED: 'bounced';
357
+ COMPLAINED: 'complained';
358
+ FAILED: 'failed';
359
+ UNSUBSCRIBED: 'unsubscribed';
360
+ }
361
+ declare const BROADCAST_RECIPIENT_FILTERS: BroadcastRecipientFilters;
362
+
363
+ type BroadcastRecipientFilter = BroadcastRecipientFilters[keyof BroadcastRecipientFilters];
364
+
365
+ type BroadcastRecipientListOptions = ListOptions & {
366
+ filter?: BroadcastRecipientFilter;
367
+ q?: string;
368
+ };
369
+
370
+ declare const API_KEY_MODES: {
371
+ readonly LIVE: "live";
372
+ readonly TEST: "test";
373
+ };
374
+
375
+ type ApiKeyMode = (typeof API_KEY_MODES)[keyof typeof API_KEY_MODES];
323
376
 
324
377
  type BroadcastStatus = (typeof BROADCAST_STATUSES)[keyof typeof BROADCAST_STATUSES];
325
378
 
@@ -385,6 +438,40 @@ type BroadcastResource = {
385
438
  updatedAt: string;
386
439
  };
387
440
 
441
+ type BroadcastStatsOptions = RequestScope & {
442
+ grain?: TrackingGrain;
443
+ offsetMinutes?: number;
444
+ };
445
+
446
+ type BroadcastStatsTotals = {
447
+ recipients: number;
448
+ pending: number;
449
+ sent: number;
450
+ delivered: number;
451
+ bounced: number;
452
+ complained: number;
453
+ failed: number;
454
+ opened: number;
455
+ clicked: number;
456
+ unsubscribed: number;
457
+ opens: number;
458
+ clicks: number;
459
+ };
460
+ type BroadcastStatsBucket = {
461
+ bucket: string;
462
+ delivered: number;
463
+ opened: number;
464
+ clicked: number;
465
+ unsubscribed: number;
466
+ };
467
+ type BroadcastStatsResource = {
468
+ object: 'broadcast_stats';
469
+ broadcastId: string;
470
+ grain: TrackingGrain;
471
+ totals: BroadcastStatsTotals;
472
+ series: Array<BroadcastStatsBucket>;
473
+ };
474
+
388
475
  type SentBroadcastResource = BroadcastResource & {
389
476
  replayed: boolean;
390
477
  };
@@ -459,40 +546,43 @@ type CalendarRangeOptions = ListOptions & {
459
546
  timezone?: string;
460
547
  };
461
548
 
462
- declare const API_SCOPES: {
463
- readonly EMAILS_SEND: "emails:send";
464
- readonly EMAILS_READ: "emails:read";
465
- readonly DRAFTS_READ: "drafts:read";
466
- readonly DRAFTS_WRITE: "drafts:write";
467
- readonly THREADS_READ: "threads:read";
468
- readonly THREADS_WRITE: "threads:write";
469
- readonly LABELS_READ: "labels:read";
470
- readonly LABELS_WRITE: "labels:write";
471
- readonly CONTACTS_READ: "contacts:read";
472
- readonly CONTACTS_WRITE: "contacts:write";
473
- readonly AUDIENCES_READ: "audiences:read";
474
- readonly AUDIENCES_WRITE: "audiences:write";
475
- readonly CALENDAR_READ: "calendar:read";
476
- readonly CALENDAR_WRITE: "calendar:write";
477
- readonly TEMPLATES_READ: "templates:read";
478
- readonly TEMPLATES_WRITE: "templates:write";
479
- readonly DOMAINS_READ: "domains:read";
480
- readonly DOMAINS_WRITE: "domains:write";
481
- readonly WEBHOOKS_READ: "webhooks:read";
482
- readonly WEBHOOKS_WRITE: "webhooks:write";
483
- readonly RULES_READ: "rules:read";
484
- readonly RULES_WRITE: "rules:write";
485
- readonly CONNECTIONS_READ: "connections:read";
486
- readonly MEMBERS_READ: "members:read";
487
- readonly MEMBERS_WRITE: "members:write";
488
- readonly ROLES_READ: "roles:read";
489
- readonly ROLES_WRITE: "roles:write";
490
- readonly SETTINGS_READ: "settings:read";
491
- readonly SETTINGS_WRITE: "settings:write";
492
- readonly KEYS_WRITE: "keys:write";
493
- readonly KEYS_READ: "keys:read";
494
- readonly KEYS_MANAGE: "keys:manage";
495
- };
549
+ interface ApiScopes {
550
+ EMAILS_SEND: 'emails:send';
551
+ EMAILS_READ: 'emails:read';
552
+ DRAFTS_READ: 'drafts:read';
553
+ DRAFTS_WRITE: 'drafts:write';
554
+ THREADS_READ: 'threads:read';
555
+ THREADS_WRITE: 'threads:write';
556
+ FILES_READ: 'files:read';
557
+ FILES_WRITE: 'files:write';
558
+ LABELS_READ: 'labels:read';
559
+ LABELS_WRITE: 'labels:write';
560
+ CONTACTS_READ: 'contacts:read';
561
+ CONTACTS_WRITE: 'contacts:write';
562
+ AUDIENCES_READ: 'audiences:read';
563
+ AUDIENCES_WRITE: 'audiences:write';
564
+ CALENDAR_READ: 'calendar:read';
565
+ CALENDAR_WRITE: 'calendar:write';
566
+ TEMPLATES_READ: 'templates:read';
567
+ TEMPLATES_WRITE: 'templates:write';
568
+ DOMAINS_READ: 'domains:read';
569
+ DOMAINS_WRITE: 'domains:write';
570
+ WEBHOOKS_READ: 'webhooks:read';
571
+ WEBHOOKS_WRITE: 'webhooks:write';
572
+ RULES_READ: 'rules:read';
573
+ RULES_WRITE: 'rules:write';
574
+ CONNECTIONS_READ: 'connections:read';
575
+ MEMBERS_READ: 'members:read';
576
+ MEMBERS_WRITE: 'members:write';
577
+ ROLES_READ: 'roles:read';
578
+ ROLES_WRITE: 'roles:write';
579
+ SETTINGS_READ: 'settings:read';
580
+ SETTINGS_WRITE: 'settings:write';
581
+ KEYS_WRITE: 'keys:write';
582
+ KEYS_READ: 'keys:read';
583
+ KEYS_MANAGE: 'keys:manage';
584
+ }
585
+ declare const API_SCOPES: ApiScopes;
496
586
  declare const CONSOLE_PERMISSIONS: {
497
587
  readonly API_KEYS_READ: "api-keys:read";
498
588
  readonly API_KEYS_WRITE: "api-keys:write";
@@ -501,7 +591,7 @@ declare const CONSOLE_PERMISSIONS: {
501
591
  readonly WORKSPACE_MANAGE: "workspace:manage";
502
592
  };
503
593
 
504
- type ApiScope = (typeof API_SCOPES)[keyof typeof API_SCOPES];
594
+ type ApiScope = ApiScopes[keyof ApiScopes];
505
595
 
506
596
  type InlineAttachmentInput = {
507
597
  filename: string;
@@ -868,6 +958,11 @@ declare const Broadcasts: (transport: Transport) => {
868
958
  listAll: (options?: BroadcastListOptions) => Promise<Array<BroadcastResource>>;
869
959
  iterate: (options?: BroadcastListOptions) => AsyncGenerator<BroadcastResource, void, undefined>;
870
960
  get: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
961
+ listRecipients: (id: string, options?: BroadcastRecipientListOptions) => Promise<Page<BroadcastRecipientResource>>;
962
+ listAllRecipients: (id: string, options?: BroadcastRecipientListOptions) => Promise<Array<BroadcastRecipientResource>>;
963
+ iterateRecipients: (id: string, options?: BroadcastRecipientListOptions) => AsyncGenerator<BroadcastRecipientResource, void, undefined>;
964
+ getRecipient: (id: string, emailId: string, options?: RequestScope) => Promise<BroadcastRecipientContentResource>;
965
+ stats: (id: string, options?: BroadcastStatsOptions) => Promise<BroadcastStatsResource>;
871
966
  cancel: (id: string, options?: RequestScope) => Promise<BroadcastResource>;
872
967
  };
873
968
 
@@ -908,7 +1003,17 @@ declare const Domains: (transport: Transport) => {
908
1003
  listAll: (options?: ListOptions) => Promise<Array<DomainResource>>;
909
1004
  iterate: (options?: ListOptions) => AsyncGenerator<DomainResource, void, undefined>;
910
1005
  get: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
1006
+ create: (body: DomainCreate, options?: RequestScope) => Promise<DomainDetailResource>;
1007
+ verify: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
911
1008
  update: (id: string, patch: DomainPatch, options?: RequestScope) => Promise<DomainDetailResource>;
1009
+ delete: (id: string, options?: RequestScope) => Promise<DeletedDomainResource>;
1010
+ listAddresses: (id: string, options?: ListOptions) => Promise<Page<DomainAddressResource>>;
1011
+ listAllAddresses: (id: string, options?: ListOptions) => Promise<Array<DomainAddressResource>>;
1012
+ iterateAddresses: (id: string, options?: ListOptions) => AsyncGenerator<DomainAddressResource, void, undefined>;
1013
+ createAddress: (id: string, body: DomainAddressCreate, options?: RequestScope) => Promise<DomainAddressResource>;
1014
+ getAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DomainAddressResource>;
1015
+ updateAddress: (id: string, addressId: string, patch: DomainAddressPatch, options?: RequestScope) => Promise<DomainAddressResource>;
1016
+ deleteAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DeletedDomainAddressResource>;
912
1017
  };
913
1018
 
914
1019
  declare const Drafts: (transport: Transport) => {
@@ -947,6 +1052,8 @@ declare const Files: (transport: Transport) => {
947
1052
  listLinks: (id: string, options?: ListOptions) => Promise<Page<FileLinkResource>>;
948
1053
  listAllLinks: (id: string, options?: ListOptions) => Promise<Array<FileLinkResource>>;
949
1054
  iterateLinks: (id: string, options?: ListOptions) => AsyncGenerator<FileLinkResource, void, undefined>;
1055
+ createLink: (id: string, options?: FileLinkCreateOptions) => Promise<FileLinkResource>;
1056
+ revokeLink: (id: string, linkId: string, options?: RequestScope) => Promise<FileLinkResource>;
950
1057
  upload: (data: RawBody, options: FileUploadOptions) => Promise<FileResource>;
951
1058
  delete: (id: string, options?: RequestScope) => Promise<DeletedFileResource>;
952
1059
  deleteMany: (ids: Array<string>, options?: RequestScope) => Promise<FileBatchDeleteResource>;
@@ -1239,6 +1346,48 @@ type TempMailOptions = Omit<TransportOptions, 'apiKey'> & {
1239
1346
  inboxToken?: string;
1240
1347
  };
1241
1348
 
1349
+ type DeletedDomainAddressResource = {
1350
+ object: 'address';
1351
+ id: string;
1352
+ address: string;
1353
+ deleted: true;
1354
+ };
1355
+
1356
+ type DeletedDomainResource = {
1357
+ object: 'domain';
1358
+ id: string;
1359
+ domain: string;
1360
+ deleted: true;
1361
+ leftBehind: Array<string>;
1362
+ };
1363
+
1364
+ type DomainAddressCreate = {
1365
+ localPart: string;
1366
+ label?: string | null;
1367
+ };
1368
+
1369
+ type DomainAddressPatch = {
1370
+ label?: string | null;
1371
+ enabled?: boolean;
1372
+ };
1373
+
1374
+ type DomainAddressResource = {
1375
+ object: 'address';
1376
+ id: string;
1377
+ domainId: string;
1378
+ address: string;
1379
+ localPart: string;
1380
+ label: string | null;
1381
+ enabled: boolean;
1382
+ lastReceivedAt: string | null;
1383
+ createdAt: string;
1384
+ updatedAt: string;
1385
+ };
1386
+
1387
+ type DomainCreate = {
1388
+ domain: string;
1389
+ };
1390
+
1242
1391
  declare const DOMAIN_SENDING_STATES: {
1243
1392
  readonly VERIFIED: "verified";
1244
1393
  readonly PENDING: "pending";
@@ -1258,6 +1407,40 @@ declare const DOMAIN_STORAGE_STATES: {
1258
1407
  readonly ACTIVE: "active";
1259
1408
  readonly FAILED: "failed";
1260
1409
  };
1410
+ interface DomainRecordStatuses {
1411
+ FOUND: 'found';
1412
+ MISSING: 'missing';
1413
+ }
1414
+ declare const DOMAIN_RECORD_STATUSES: DomainRecordStatuses;
1415
+ interface DomainDmarcStages {
1416
+ MISSING: 'missing';
1417
+ INVALID: 'invalid';
1418
+ MONITOR: 'monitor';
1419
+ QUARANTINE: 'quarantine';
1420
+ REJECT: 'reject';
1421
+ }
1422
+ declare const DOMAIN_DMARC_STAGES: DomainDmarcStages;
1423
+
1424
+ type DomainDmarcStage = DomainDmarcStages[keyof DomainDmarcStages];
1425
+
1426
+ type DomainDmarcResource = {
1427
+ stage: DomainDmarcStage;
1428
+ record: string | null;
1429
+ issues: Array<string>;
1430
+ alignmentPossible: boolean;
1431
+ caveat: string;
1432
+ };
1433
+
1434
+ type DomainRecordStatus = DomainRecordStatuses[keyof DomainRecordStatuses];
1435
+
1436
+ type DomainRecordResource = {
1437
+ type: string;
1438
+ name: string;
1439
+ value: string;
1440
+ priority: number | null;
1441
+ purpose: string | null;
1442
+ status: DomainRecordStatus | null;
1443
+ };
1261
1444
 
1262
1445
  type DomainSendingState = (typeof DOMAIN_SENDING_STATES)[keyof typeof DOMAIN_SENDING_STATES];
1263
1446
 
@@ -1323,9 +1506,12 @@ type DomainDetailResource = DomainResource & {
1323
1506
  address: string;
1324
1507
  enabled: boolean;
1325
1508
  }>;
1509
+ records: Array<DomainRecordResource>;
1510
+ dmarc: DomainDmarcResource | null;
1326
1511
  };
1327
1512
 
1328
1513
  type DomainPatch = {
1514
+ catchAll?: boolean;
1329
1515
  trackingHost?: string | null;
1330
1516
  storageHost?: string | null;
1331
1517
  };
@@ -1613,6 +1799,12 @@ interface FileUsages {
1613
1799
  }
1614
1800
  type FileUsage = FileUsages[keyof FileUsages];
1615
1801
  declare const FILE_USAGES: FileUsages;
1802
+ interface FileVisibilities {
1803
+ PUBLIC: 'public';
1804
+ PRIVATE: 'private';
1805
+ }
1806
+ type FileVisibility = FileVisibilities[keyof FileVisibilities];
1807
+ declare const FILE_VISIBILITIES: FileVisibilities;
1616
1808
 
1617
1809
  type FileKept = {
1618
1810
  id: string;
@@ -1649,6 +1841,10 @@ type FileLinkCount = {
1649
1841
  lastDownloadAt: string | null;
1650
1842
  };
1651
1843
 
1844
+ type FileLinkCreateOptions = RequestScope & {
1845
+ domain?: string;
1846
+ };
1847
+
1652
1848
  type FileLinkResource = {
1653
1849
  object: 'file_link';
1654
1850
  id: string;
@@ -1658,6 +1854,7 @@ type FileLinkResource = {
1658
1854
  sizeBytes: number;
1659
1855
  host: string | null;
1660
1856
  url: string;
1857
+ published: boolean;
1661
1858
  downloads: number;
1662
1859
  lastDownloadAt: string | null;
1663
1860
  revokedAt: string | null;
@@ -1669,6 +1866,10 @@ type FileSort = (typeof FILE_SORTS)[keyof typeof FILE_SORTS];
1669
1866
  type FileListOptions = ListOptions & {
1670
1867
  q?: string;
1671
1868
  kind?: FileKind;
1869
+ direction?: FileDirection;
1870
+ address?: string;
1871
+ since?: Date | string;
1872
+ until?: Date | string;
1672
1873
  sort?: FileSort;
1673
1874
  };
1674
1875
 
@@ -1684,6 +1885,8 @@ type FileResource = {
1684
1885
  deliveredTo: string | null;
1685
1886
  usage: FileUsage | null;
1686
1887
  deletable: boolean;
1888
+ visibility: FileVisibility;
1889
+ publicUrl: string | null;
1687
1890
  createdAt: string;
1688
1891
  };
1689
1892
 
@@ -3153,28 +3356,31 @@ type TrackingStatsResource = {
3153
3356
  }>;
3154
3357
  };
3155
3358
 
3156
- declare const WEBHOOK_EVENTS: {
3157
- readonly EMAIL_RECEIVED: "email.received";
3158
- readonly EMAIL_REPLIED: "email.replied";
3159
- readonly EMAIL_SENT: "email.sent";
3160
- readonly EMAIL_FAILED: "email.failed";
3161
- readonly EMAIL_CANCELLED: "email.cancelled";
3162
- readonly EMAIL_SCHEDULED: "email.scheduled";
3163
- readonly EMAIL_QUEUED: "email.queued";
3164
- readonly EMAIL_DELIVERED: "email.delivered";
3165
- readonly EMAIL_DELIVERY_DELAYED: "email.delivery_delayed";
3166
- readonly EMAIL_BOUNCED: "email.bounced";
3167
- readonly EMAIL_COMPLAINED: "email.complained";
3168
- readonly EMAIL_SUPPRESSED: "email.suppressed";
3169
- readonly EMAIL_OPENED: "email.opened";
3170
- readonly EMAIL_CLICKED: "email.clicked";
3171
- readonly EMAIL_DOWNLOADED: "email.downloaded";
3172
- readonly DOMAIN_VERIFIED: "domain.verified";
3173
- readonly DOMAIN_SENDING_CHANGED: "domain.sending_changed";
3174
- readonly DOMAIN_DELETED: "domain.deleted";
3175
- readonly SUPPRESSION_ADDED: "suppression.added";
3176
- readonly SUPPRESSION_REMOVED: "suppression.removed";
3177
- };
3359
+ interface WebhookEvents {
3360
+ EMAIL_RECEIVED: 'email.received';
3361
+ EMAIL_REPLIED: 'email.replied';
3362
+ EMAIL_SENT: 'email.sent';
3363
+ EMAIL_FAILED: 'email.failed';
3364
+ EMAIL_CANCELLED: 'email.cancelled';
3365
+ EMAIL_SCHEDULED: 'email.scheduled';
3366
+ EMAIL_QUEUED: 'email.queued';
3367
+ EMAIL_DELIVERED: 'email.delivered';
3368
+ EMAIL_DELIVERY_DELAYED: 'email.delivery_delayed';
3369
+ EMAIL_BOUNCED: 'email.bounced';
3370
+ EMAIL_COMPLAINED: 'email.complained';
3371
+ EMAIL_SUPPRESSED: 'email.suppressed';
3372
+ EMAIL_OPENED: 'email.opened';
3373
+ EMAIL_CLICKED: 'email.clicked';
3374
+ EMAIL_DOWNLOADED: 'email.downloaded';
3375
+ DOMAIN_VERIFIED: 'domain.verified';
3376
+ DOMAIN_SENDING_CHANGED: 'domain.sending_changed';
3377
+ DOMAIN_DELETED: 'domain.deleted';
3378
+ SUPPRESSION_ADDED: 'suppression.added';
3379
+ SUPPRESSION_REMOVED: 'suppression.removed';
3380
+ FILE_UPLOADED: 'file.uploaded';
3381
+ FILE_DELETED: 'file.deleted';
3382
+ }
3383
+ declare const WEBHOOK_EVENTS: WebhookEvents;
3178
3384
  declare const WEBHOOK_DELIVERY_STATUSES: {
3179
3385
  readonly DELIVERED: "delivered";
3180
3386
  readonly FAILED: "failed";
@@ -3200,7 +3406,7 @@ declare const WEBHOOK_REPLAY_ERROR_CODES: {
3200
3406
  readonly REPLAY_IN_PROGRESS: "replay_in_progress";
3201
3407
  };
3202
3408
 
3203
- type WebhookEvent = (typeof WEBHOOK_EVENTS)[keyof typeof WEBHOOK_EVENTS];
3409
+ type WebhookEvent = WebhookEvents[keyof WebhookEvents];
3204
3410
 
3205
3411
  type WebhookResource = {
3206
3412
  object: 'webhook';
@@ -3268,6 +3474,19 @@ type EmailDownloadedData = Omit<EmailOpenedData, 'recipient' | 'attributed' | 'o
3268
3474
  downloadedAt: string;
3269
3475
  };
3270
3476
 
3477
+ type FileEventData = {
3478
+ fileId: string;
3479
+ filename: string;
3480
+ mimeType: string;
3481
+ sizeBytes: number;
3482
+ direction: FileDirection;
3483
+ to: string | null;
3484
+ threadId: string | null;
3485
+ messageId: string | null;
3486
+ uploadedAt?: string;
3487
+ deletedAt?: string;
3488
+ };
3489
+
3271
3490
  type WebhookSignatureHeaders = Record<string, string | Array<string> | undefined>;
3272
3491
 
3273
3492
  type VerifyWebhookProps = {
@@ -3486,5 +3705,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
3486
3705
  declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
3487
3706
  declare const isRtlLanguage: (code: string | null | undefined) => boolean;
3488
3707
 
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 };
3708
+ export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, DOMAIN_DMARC_STAGES, DOMAIN_RECORD_STATUSES, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, FILE_VISIBILITIES, 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 };
3709
+ 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, AudienceMemberStatus, 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, DeletedDomainAddressResource, DeletedDomainResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainAddressCreate, DomainAddressPatch, DomainAddressResource, DomainCreate, DomainDetailResource, DomainDmarcResource, DomainDmarcStage, DomainPatch, DomainRecordResource, DomainRecordStatus, 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, FileVisibility, 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 };