@openemail/sdk 0.0.5 → 0.0.6

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.d.cts CHANGED
@@ -371,6 +371,11 @@ declare const API_KEY_MODES: {
371
371
  readonly LIVE: "live";
372
372
  readonly TEST: "test";
373
373
  };
374
+ interface CredentialKinds {
375
+ API_KEY: 'apiKey';
376
+ OAUTH: 'oauth';
377
+ }
378
+ declare const CREDENTIAL_KINDS: CredentialKinds;
374
379
 
375
380
  type ApiKeyMode = (typeof API_KEY_MODES)[keyof typeof API_KEY_MODES];
376
381
 
@@ -656,6 +661,8 @@ type BuiltinRole = (typeof BUILTIN_ROLES)[keyof typeof BUILTIN_ROLES];
656
661
 
657
662
  type ConsolePermission = (typeof CONSOLE_PERMISSIONS)[keyof typeof CONSOLE_PERMISSIONS];
658
663
 
664
+ type CredentialKind = CredentialKinds[keyof CredentialKinds];
665
+
659
666
  type HitKind = (typeof HIT_KINDS)[keyof typeof HIT_KINDS];
660
667
 
661
668
  type LogWindow = {
@@ -875,6 +882,8 @@ type PersonListOptions = ListOptions & {
875
882
  blocked?: boolean;
876
883
  };
877
884
 
885
+ type AccessTokenProvider = () => string | Promise<string>;
886
+
878
887
  type ApiErrorPayload = {
879
888
  type?: string;
880
889
  code?: string;
@@ -912,6 +921,7 @@ type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<
912
921
 
913
922
  type TransportOptions = {
914
923
  apiKey?: string;
924
+ accessToken?: string | AccessTokenProvider;
915
925
  baseUrl?: string;
916
926
  fetch?: FetchLike;
917
927
  maxRetries?: number;
@@ -1172,6 +1182,12 @@ declare const Rules: (transport: Transport) => {
1172
1182
  iterateRuns: (options?: RuleRunListOptions) => AsyncGenerator<RuleRunResource, void, undefined>;
1173
1183
  };
1174
1184
 
1185
+ declare const Security: (transport: Transport) => {
1186
+ stepUpStatus: (options?: RequestScope) => Promise<StepUpStatusResource>;
1187
+ beginStepUp: (body?: StepUpBegin, options?: RequestScope) => Promise<StepUpChallengeResource>;
1188
+ verifyStepUp: (body: StepUpVerify, options?: RequestScope) => Promise<StepUpVerifiedResource>;
1189
+ };
1190
+
1175
1191
  declare const Settings: (transport: Transport) => {
1176
1192
  get: (options?: SettingsOptions) => Promise<SettingsResource>;
1177
1193
  update: (patch: SettingsPatch, options?: SettingsOptions) => Promise<SettingsResource>;
@@ -1283,6 +1299,7 @@ declare class OpenEmail {
1283
1299
  private readonly transport;
1284
1300
  readonly mode: ApiKeyMode;
1285
1301
  readonly me: ReturnType<typeof Me>;
1302
+ readonly security: ReturnType<typeof Security>;
1286
1303
  readonly keys: ReturnType<typeof Keys>;
1287
1304
  readonly addresses: ReturnType<typeof Addresses>;
1288
1305
  readonly languages: ReturnType<typeof Languages>;
@@ -1342,7 +1359,7 @@ type SendScope = RequestScope & {
1342
1359
  idempotencyKey?: string;
1343
1360
  };
1344
1361
 
1345
- type TempMailOptions = Omit<TransportOptions, 'apiKey'> & {
1362
+ type TempMailOptions = Omit<TransportOptions, 'apiKey' | 'accessToken'> & {
1346
1363
  inboxToken?: string;
1347
1364
  };
1348
1365
 
@@ -2327,8 +2344,20 @@ type LabelResource = {
2327
2344
  updatedAt: string | null;
2328
2345
  };
2329
2346
 
2330
- type KeyResource = {
2347
+ type ApiKeyPingResource = {
2348
+ ok: true;
2349
+ kind: CredentialKinds['API_KEY'];
2350
+ keyId: string;
2351
+ mode: ApiKeyMode;
2352
+ scopes: Array<ApiScope>;
2353
+ roleId: string | null;
2354
+ grantedScopes: Array<ApiScope>;
2355
+ workspaceId: string;
2356
+ };
2357
+
2358
+ type ApiKeySelfResource = {
2331
2359
  object: 'api_key';
2360
+ kind: CredentialKinds['API_KEY'];
2332
2361
  id: string;
2333
2362
  mode: ApiKeyMode;
2334
2363
  scopes: Array<ApiScope>;
@@ -2339,17 +2368,38 @@ type KeyResource = {
2339
2368
  domainAllowlist: Array<string> | null;
2340
2369
  };
2341
2370
 
2342
- type PingResource = {
2371
+ type OauthTokenSelfResource = {
2372
+ object: 'oauth_token';
2373
+ kind: CredentialKinds['OAUTH'];
2374
+ id: null;
2375
+ clientId: string;
2376
+ mode: (typeof API_KEY_MODES)['LIVE'];
2377
+ scopes: Array<ApiScope>;
2378
+ roleId: null;
2379
+ grantedScopes: Array<ApiScope>;
2380
+ workspaceId: string;
2381
+ addressAllowlist: Array<string> | null;
2382
+ domainAllowlist: Array<string> | null;
2383
+ expiresAt: string | null;
2384
+ };
2385
+
2386
+ type KeyResource = ApiKeySelfResource | OauthTokenSelfResource;
2387
+
2388
+ type OauthTokenPingResource = {
2343
2389
  ok: true;
2344
- keyId: string;
2345
- mode: ApiKeyMode;
2390
+ kind: CredentialKinds['OAUTH'];
2391
+ keyId: null;
2392
+ clientId: string;
2393
+ mode: (typeof API_KEY_MODES)['LIVE'];
2346
2394
  scopes: Array<ApiScope>;
2347
- roleId: string | null;
2395
+ roleId: null;
2348
2396
  grantedScopes: Array<ApiScope>;
2349
2397
  workspaceId: string;
2350
2398
  };
2351
2399
 
2352
- type RotatedKeyResource = KeyResource & {
2400
+ type PingResource = ApiKeyPingResource | OauthTokenPingResource;
2401
+
2402
+ type RotatedKeyResource = Omit<ApiKeySelfResource, 'kind'> & {
2353
2403
  token: string;
2354
2404
  rotationCount: number;
2355
2405
  rotatedAt: string;
@@ -2667,6 +2717,55 @@ type RuleTestResource = {
2667
2717
  }>;
2668
2718
  };
2669
2719
 
2720
+ type StepUpBegin = {
2721
+ resend?: boolean;
2722
+ };
2723
+
2724
+ interface StepUpMethods {
2725
+ EMAIL: 'email';
2726
+ TOTP: 'totp';
2727
+ }
2728
+ declare const STEP_UP_METHODS: StepUpMethods;
2729
+ interface StepUpErrorCodes {
2730
+ STEP_UP_REQUIRED: 'step_up_required';
2731
+ STEP_UP_NOT_APPLICABLE: 'step_up_not_applicable';
2732
+ STEP_UP_THROTTLED: 'step_up_throttled';
2733
+ STEP_UP_UNDELIVERABLE: 'step_up_undeliverable';
2734
+ STEP_UP_CODE_INVALID: 'step_up_code_invalid';
2735
+ STEP_UP_CODE_EXPIRED: 'step_up_code_expired';
2736
+ STEP_UP_LOCKED: 'step_up_locked';
2737
+ }
2738
+ declare const STEP_UP_ERROR_CODES: StepUpErrorCodes;
2739
+
2740
+ type StepUpMethod = StepUpMethods[keyof StepUpMethods];
2741
+
2742
+ type StepUpChallengeResource = {
2743
+ object: 'step_up_challenge';
2744
+ method: StepUpMethod;
2745
+ sentTo?: string;
2746
+ reused: boolean;
2747
+ };
2748
+
2749
+ type StepUpErrorCode = StepUpErrorCodes[keyof StepUpErrorCodes];
2750
+
2751
+ type StepUpStatusResource = {
2752
+ object: 'step_up';
2753
+ elevated: boolean;
2754
+ elevatedUntil: string | null;
2755
+ method: StepUpMethod;
2756
+ minutes: number;
2757
+ };
2758
+
2759
+ type StepUpVerifiedResource = {
2760
+ object: 'step_up';
2761
+ elevated: true;
2762
+ elevatedUntil: string;
2763
+ };
2764
+
2765
+ type StepUpVerify = {
2766
+ code: string;
2767
+ };
2768
+
2670
2769
  type SettingsOptions = RequestScope & {
2671
2770
  address?: string;
2672
2771
  };
@@ -3256,6 +3355,7 @@ type ThreadResource = {
3256
3355
  messageCount: number;
3257
3356
  hasUnread: boolean;
3258
3357
  totalReplies: number;
3358
+ deliveredTo: string | null;
3259
3359
  };
3260
3360
 
3261
3361
  type ThreadSummaryResource = {
@@ -3633,6 +3733,7 @@ declare class Transport {
3633
3733
  inboxToken?: string;
3634
3734
  });
3635
3735
  request<T>(path: string, options?: RequestOptions): Promise<T>;
3736
+ private resolveAccessToken;
3636
3737
  private headersFor;
3637
3738
  private attempt;
3638
3739
  private parse;
@@ -3650,6 +3751,7 @@ declare class OpenEmailApiError extends Error {
3650
3751
  get isAuth(): boolean;
3651
3752
  get isPermission(): boolean;
3652
3753
  get isScopeMissing(): boolean;
3754
+ get isStepUpRequired(): boolean;
3653
3755
  get isInvalidRequest(): boolean;
3654
3756
  get isValidation(): boolean;
3655
3757
  get isNotFound(): boolean;
@@ -3700,10 +3802,11 @@ declare const createTempMail: (options?: TempMailOptions) => ReturnType<(transpo
3700
3802
  declare const verifyWebhookSignature: <T = Record<string, unknown>>(props: VerifyWebhookProps) => Promise<WebhookPayload<T>>;
3701
3803
  declare const toBase64: (bytes: Uint8Array | ArrayBuffer) => string;
3702
3804
  declare const isApiKey: (value: unknown) => value is string;
3805
+ declare const isAccessToken: (value: unknown) => value is string;
3703
3806
  declare const isSealed: (message: Pick<MessageResource, "encryption">) => boolean;
3704
3807
  declare const resolveLanguage: (input: string | null | undefined) => LanguageResource | undefined;
3705
3808
  declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
3706
3809
  declare const isRtlLanguage: (code: string | null | undefined) => boolean;
3707
3810
 
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 };
3811
+ export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, CREDENTIAL_KINDS, 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, STEP_UP_ERROR_CODES, STEP_UP_METHODS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isAccessToken, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
3812
+ export type { AccessTokenProvider, AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyPingResource, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeySelfResource, 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, CredentialKind, 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, OauthTokenPingResource, OauthTokenSelfResource, 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, StepUpBegin, StepUpChallengeResource, StepUpErrorCode, StepUpMethod, StepUpStatusResource, StepUpVerifiedResource, StepUpVerify, 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
@@ -371,6 +371,11 @@ declare const API_KEY_MODES: {
371
371
  readonly LIVE: "live";
372
372
  readonly TEST: "test";
373
373
  };
374
+ interface CredentialKinds {
375
+ API_KEY: 'apiKey';
376
+ OAUTH: 'oauth';
377
+ }
378
+ declare const CREDENTIAL_KINDS: CredentialKinds;
374
379
 
375
380
  type ApiKeyMode = (typeof API_KEY_MODES)[keyof typeof API_KEY_MODES];
376
381
 
@@ -656,6 +661,8 @@ type BuiltinRole = (typeof BUILTIN_ROLES)[keyof typeof BUILTIN_ROLES];
656
661
 
657
662
  type ConsolePermission = (typeof CONSOLE_PERMISSIONS)[keyof typeof CONSOLE_PERMISSIONS];
658
663
 
664
+ type CredentialKind = CredentialKinds[keyof CredentialKinds];
665
+
659
666
  type HitKind = (typeof HIT_KINDS)[keyof typeof HIT_KINDS];
660
667
 
661
668
  type LogWindow = {
@@ -875,6 +882,8 @@ type PersonListOptions = ListOptions & {
875
882
  blocked?: boolean;
876
883
  };
877
884
 
885
+ type AccessTokenProvider = () => string | Promise<string>;
886
+
878
887
  type ApiErrorPayload = {
879
888
  type?: string;
880
889
  code?: string;
@@ -912,6 +921,7 @@ type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<
912
921
 
913
922
  type TransportOptions = {
914
923
  apiKey?: string;
924
+ accessToken?: string | AccessTokenProvider;
915
925
  baseUrl?: string;
916
926
  fetch?: FetchLike;
917
927
  maxRetries?: number;
@@ -1172,6 +1182,12 @@ declare const Rules: (transport: Transport) => {
1172
1182
  iterateRuns: (options?: RuleRunListOptions) => AsyncGenerator<RuleRunResource, void, undefined>;
1173
1183
  };
1174
1184
 
1185
+ declare const Security: (transport: Transport) => {
1186
+ stepUpStatus: (options?: RequestScope) => Promise<StepUpStatusResource>;
1187
+ beginStepUp: (body?: StepUpBegin, options?: RequestScope) => Promise<StepUpChallengeResource>;
1188
+ verifyStepUp: (body: StepUpVerify, options?: RequestScope) => Promise<StepUpVerifiedResource>;
1189
+ };
1190
+
1175
1191
  declare const Settings: (transport: Transport) => {
1176
1192
  get: (options?: SettingsOptions) => Promise<SettingsResource>;
1177
1193
  update: (patch: SettingsPatch, options?: SettingsOptions) => Promise<SettingsResource>;
@@ -1283,6 +1299,7 @@ declare class OpenEmail {
1283
1299
  private readonly transport;
1284
1300
  readonly mode: ApiKeyMode;
1285
1301
  readonly me: ReturnType<typeof Me>;
1302
+ readonly security: ReturnType<typeof Security>;
1286
1303
  readonly keys: ReturnType<typeof Keys>;
1287
1304
  readonly addresses: ReturnType<typeof Addresses>;
1288
1305
  readonly languages: ReturnType<typeof Languages>;
@@ -1342,7 +1359,7 @@ type SendScope = RequestScope & {
1342
1359
  idempotencyKey?: string;
1343
1360
  };
1344
1361
 
1345
- type TempMailOptions = Omit<TransportOptions, 'apiKey'> & {
1362
+ type TempMailOptions = Omit<TransportOptions, 'apiKey' | 'accessToken'> & {
1346
1363
  inboxToken?: string;
1347
1364
  };
1348
1365
 
@@ -2327,8 +2344,20 @@ type LabelResource = {
2327
2344
  updatedAt: string | null;
2328
2345
  };
2329
2346
 
2330
- type KeyResource = {
2347
+ type ApiKeyPingResource = {
2348
+ ok: true;
2349
+ kind: CredentialKinds['API_KEY'];
2350
+ keyId: string;
2351
+ mode: ApiKeyMode;
2352
+ scopes: Array<ApiScope>;
2353
+ roleId: string | null;
2354
+ grantedScopes: Array<ApiScope>;
2355
+ workspaceId: string;
2356
+ };
2357
+
2358
+ type ApiKeySelfResource = {
2331
2359
  object: 'api_key';
2360
+ kind: CredentialKinds['API_KEY'];
2332
2361
  id: string;
2333
2362
  mode: ApiKeyMode;
2334
2363
  scopes: Array<ApiScope>;
@@ -2339,17 +2368,38 @@ type KeyResource = {
2339
2368
  domainAllowlist: Array<string> | null;
2340
2369
  };
2341
2370
 
2342
- type PingResource = {
2371
+ type OauthTokenSelfResource = {
2372
+ object: 'oauth_token';
2373
+ kind: CredentialKinds['OAUTH'];
2374
+ id: null;
2375
+ clientId: string;
2376
+ mode: (typeof API_KEY_MODES)['LIVE'];
2377
+ scopes: Array<ApiScope>;
2378
+ roleId: null;
2379
+ grantedScopes: Array<ApiScope>;
2380
+ workspaceId: string;
2381
+ addressAllowlist: Array<string> | null;
2382
+ domainAllowlist: Array<string> | null;
2383
+ expiresAt: string | null;
2384
+ };
2385
+
2386
+ type KeyResource = ApiKeySelfResource | OauthTokenSelfResource;
2387
+
2388
+ type OauthTokenPingResource = {
2343
2389
  ok: true;
2344
- keyId: string;
2345
- mode: ApiKeyMode;
2390
+ kind: CredentialKinds['OAUTH'];
2391
+ keyId: null;
2392
+ clientId: string;
2393
+ mode: (typeof API_KEY_MODES)['LIVE'];
2346
2394
  scopes: Array<ApiScope>;
2347
- roleId: string | null;
2395
+ roleId: null;
2348
2396
  grantedScopes: Array<ApiScope>;
2349
2397
  workspaceId: string;
2350
2398
  };
2351
2399
 
2352
- type RotatedKeyResource = KeyResource & {
2400
+ type PingResource = ApiKeyPingResource | OauthTokenPingResource;
2401
+
2402
+ type RotatedKeyResource = Omit<ApiKeySelfResource, 'kind'> & {
2353
2403
  token: string;
2354
2404
  rotationCount: number;
2355
2405
  rotatedAt: string;
@@ -2667,6 +2717,55 @@ type RuleTestResource = {
2667
2717
  }>;
2668
2718
  };
2669
2719
 
2720
+ type StepUpBegin = {
2721
+ resend?: boolean;
2722
+ };
2723
+
2724
+ interface StepUpMethods {
2725
+ EMAIL: 'email';
2726
+ TOTP: 'totp';
2727
+ }
2728
+ declare const STEP_UP_METHODS: StepUpMethods;
2729
+ interface StepUpErrorCodes {
2730
+ STEP_UP_REQUIRED: 'step_up_required';
2731
+ STEP_UP_NOT_APPLICABLE: 'step_up_not_applicable';
2732
+ STEP_UP_THROTTLED: 'step_up_throttled';
2733
+ STEP_UP_UNDELIVERABLE: 'step_up_undeliverable';
2734
+ STEP_UP_CODE_INVALID: 'step_up_code_invalid';
2735
+ STEP_UP_CODE_EXPIRED: 'step_up_code_expired';
2736
+ STEP_UP_LOCKED: 'step_up_locked';
2737
+ }
2738
+ declare const STEP_UP_ERROR_CODES: StepUpErrorCodes;
2739
+
2740
+ type StepUpMethod = StepUpMethods[keyof StepUpMethods];
2741
+
2742
+ type StepUpChallengeResource = {
2743
+ object: 'step_up_challenge';
2744
+ method: StepUpMethod;
2745
+ sentTo?: string;
2746
+ reused: boolean;
2747
+ };
2748
+
2749
+ type StepUpErrorCode = StepUpErrorCodes[keyof StepUpErrorCodes];
2750
+
2751
+ type StepUpStatusResource = {
2752
+ object: 'step_up';
2753
+ elevated: boolean;
2754
+ elevatedUntil: string | null;
2755
+ method: StepUpMethod;
2756
+ minutes: number;
2757
+ };
2758
+
2759
+ type StepUpVerifiedResource = {
2760
+ object: 'step_up';
2761
+ elevated: true;
2762
+ elevatedUntil: string;
2763
+ };
2764
+
2765
+ type StepUpVerify = {
2766
+ code: string;
2767
+ };
2768
+
2670
2769
  type SettingsOptions = RequestScope & {
2671
2770
  address?: string;
2672
2771
  };
@@ -3256,6 +3355,7 @@ type ThreadResource = {
3256
3355
  messageCount: number;
3257
3356
  hasUnread: boolean;
3258
3357
  totalReplies: number;
3358
+ deliveredTo: string | null;
3259
3359
  };
3260
3360
 
3261
3361
  type ThreadSummaryResource = {
@@ -3633,6 +3733,7 @@ declare class Transport {
3633
3733
  inboxToken?: string;
3634
3734
  });
3635
3735
  request<T>(path: string, options?: RequestOptions): Promise<T>;
3736
+ private resolveAccessToken;
3636
3737
  private headersFor;
3637
3738
  private attempt;
3638
3739
  private parse;
@@ -3650,6 +3751,7 @@ declare class OpenEmailApiError extends Error {
3650
3751
  get isAuth(): boolean;
3651
3752
  get isPermission(): boolean;
3652
3753
  get isScopeMissing(): boolean;
3754
+ get isStepUpRequired(): boolean;
3653
3755
  get isInvalidRequest(): boolean;
3654
3756
  get isValidation(): boolean;
3655
3757
  get isNotFound(): boolean;
@@ -3700,10 +3802,11 @@ declare const createTempMail: (options?: TempMailOptions) => ReturnType<(transpo
3700
3802
  declare const verifyWebhookSignature: <T = Record<string, unknown>>(props: VerifyWebhookProps) => Promise<WebhookPayload<T>>;
3701
3803
  declare const toBase64: (bytes: Uint8Array | ArrayBuffer) => string;
3702
3804
  declare const isApiKey: (value: unknown) => value is string;
3805
+ declare const isAccessToken: (value: unknown) => value is string;
3703
3806
  declare const isSealed: (message: Pick<MessageResource, "encryption">) => boolean;
3704
3807
  declare const resolveLanguage: (input: string | null | undefined) => LanguageResource | undefined;
3705
3808
  declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
3706
3809
  declare const isRtlLanguage: (code: string | null | undefined) => boolean;
3707
3810
 
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 };
3811
+ export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, CREDENTIAL_KINDS, 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, STEP_UP_ERROR_CODES, STEP_UP_METHODS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isAccessToken, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
3812
+ export type { AccessTokenProvider, AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyPingResource, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeySelfResource, 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, CredentialKind, 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, OauthTokenPingResource, OauthTokenSelfResource, 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, StepUpBegin, StepUpChallengeResource, StepUpErrorCode, StepUpMethod, StepUpStatusResource, StepUpVerifiedResource, StepUpVerify, 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 };