@rapidmx/web-client 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +415 -381
- package/apps/admin/_layout.tsx +2 -2
- package/apps/admin/audit-log/index.tsx +4 -4
- package/apps/admin/branding/index.tsx +39 -39
- package/apps/admin/data-requests/index.tsx +482 -482
- package/apps/admin/distribution-lists/[uid].tsx +3 -3
- package/apps/admin/distribution-lists/index.tsx +4 -4
- package/apps/admin/distribution-lists/new/index.tsx +5 -5
- package/apps/admin/domains/[uid].tsx +166 -166
- package/apps/admin/domains/index.tsx +4 -4
- package/apps/admin/domains/new/index.tsx +5 -5
- package/apps/admin/encryption-policy/index.tsx +1 -1
- package/apps/admin/escrow-scopes/[uid].tsx +350 -350
- package/apps/admin/escrow-scopes/index.tsx +4 -4
- package/apps/admin/escrow-scopes/new/index.tsx +5 -5
- package/apps/admin/index.tsx +129 -129
- package/apps/admin/ingest-queue/index.tsx +4 -4
- package/apps/admin/mailbox-policy/index.tsx +1 -1
- package/apps/admin/mailboxes/[uid].tsx +271 -271
- package/apps/admin/mailboxes/new/index.tsx +30 -30
- package/apps/admin/plugins/index.tsx +15 -15
- package/apps/admin/quarantine/index.tsx +5 -5
- package/apps/admin/retention-policy/index.tsx +39 -39
- package/apps/admin/signing-certificates/index.tsx +343 -343
- package/apps/admin/transport-rules/[uid].tsx +5 -5
- package/apps/admin/transport-rules/_transportRuleConfig.tsx +3 -3
- package/apps/admin/transport-rules/index.tsx +4 -4
- package/apps/admin/transport-rules/new/index.tsx +5 -5
- package/apps/escrow/_layout.tsx +1 -1
- package/apps/escrow/audit-log/index.tsx +196 -196
- package/apps/escrow/index.tsx +4 -4
- package/apps/escrow/matters/[uid].tsx +621 -621
- package/apps/escrow/matters/new/index.tsx +6 -6
- package/apps/shared/appearance/AppearanceForm.tsx +3 -3
- package/apps/shared/appearance/AppearanceHead.tsx +1 -1
- package/apps/shared/appearance/AppearanceProvider.tsx +3 -3
- package/apps/shared/appearance/appearanceCache.ts +1 -1
- package/apps/shared/appearance/appearanceContext.ts +1 -1
- package/apps/shared/appearance/theme.ts +1 -1
- package/apps/shared/auth/adminAccess.ts +99 -99
- package/apps/shared/calendar/bookingPlugin.ts +1 -1
- package/apps/shared/calendar/calendarLiveUpdates.ts +1 -1
- package/apps/shared/calendar/calendarReminders.ts +1 -1
- package/apps/shared/calendar/useCalendarReminders.ts +1 -1
- package/apps/shared/components/admin/diagnostics/DiagnosticsManager.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/InstalledPlugins.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/LogsPanel.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/PackagesTable.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/RuntimePanel.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/SystemPanel.tsx +2 -2
- package/apps/shared/components/admin/diagnostics/VersionsPanel.tsx +1 -1
- package/apps/shared/components/admin/diagnostics/diagnosticsApi.ts +1 -1
- package/apps/shared/components/admin/diagnostics/format.ts +1 -1
- package/apps/shared/components/admin/diagnostics/logClient.ts +1 -1
- package/apps/shared/components/admin/distributionLists/MemberListCard.tsx +4 -4
- package/apps/shared/components/admin/elevation.ts +1 -1
- package/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.tsx +3 -3
- package/apps/shared/components/admin/layout/AdminShell.tsx +384 -384
- package/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.tsx +238 -238
- package/apps/shared/components/admin/mailboxes/EscrowScopeCard.tsx +154 -152
- package/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.tsx +194 -194
- package/apps/shared/components/admin/mailboxes/MailboxTable.tsx +1 -1
- package/apps/shared/components/admin/mailboxes/ResourceSettingsCard.tsx +19 -14
- package/apps/shared/components/admin/mailboxes/ShareAccessCard.tsx +5 -5
- package/apps/shared/components/admin/settings/BrandingForm.tsx +423 -423
- package/apps/shared/components/admin/settings/DomainDnsSetup.tsx +5 -5
- package/apps/shared/components/admin/settings/EncryptionPolicyForm.tsx +119 -119
- package/apps/shared/components/admin/settings/LoadedSettingsForm.tsx +2 -2
- package/apps/shared/components/admin/settings/MailboxCreateForm.tsx +32 -27
- package/apps/shared/components/admin/settings/MailboxPolicyForm.tsx +198 -198
- package/apps/shared/components/admin/settings/PluginsManager.tsx +2093 -2093
- package/apps/shared/components/admin/settings/RetentionPolicyForm.tsx +182 -182
- package/apps/shared/components/admin/setup/EscrowSetupStep.tsx +288 -288
- package/apps/shared/components/admin/setup/SetupWizard.tsx +450 -446
- package/apps/shared/components/admin/signOut.ts +1 -1
- package/apps/shared/components/admin/usePagedList.tsx +129 -129
- package/apps/shared/components/calendar/AppointmentQuickForm.tsx +3 -3
- package/apps/shared/components/calendar/CalendarListSidebar.tsx +3 -3
- package/apps/shared/components/calendar/DescriptionEditor.tsx +1 -1
- package/apps/shared/components/calendar/EventDescriptionView.tsx +1 -1
- package/apps/shared/components/calendar/EventDetails.tsx +16 -14
- package/apps/shared/components/calendar/EventEditor.tsx +54 -39
- package/apps/shared/components/calendar/EventExpandedForm.tsx +3 -3
- package/apps/shared/components/calendar/EventFormParts.tsx +2 -2
- package/apps/shared/components/calendar/EventModal.tsx +206 -206
- package/apps/shared/components/calendar/EventQuickForm.tsx +3 -3
- package/apps/shared/components/calendar/EventShell.tsx +1 -1
- package/apps/shared/components/calendar/FindATime.tsx +6 -4
- package/apps/shared/components/calendar/GuestInput.tsx +2 -2
- package/apps/shared/components/calendar/MonthView.tsx +185 -185
- package/apps/shared/components/calendar/QuickCreateFaces.tsx +1 -1
- package/apps/shared/components/calendar/QuickFaceFrame.tsx +1 -1
- package/apps/shared/components/calendar/RecurrenceEditor.tsx +227 -227
- package/apps/shared/components/calendar/RequestChangeForm.tsx +8 -6
- package/apps/shared/components/calendar/ResourcePicker.tsx +7 -5
- package/apps/shared/components/calendar/SplitDayView.tsx +144 -144
- package/apps/shared/components/calendar/TaskQuickForm.tsx +23 -18
- package/apps/shared/components/calendar/TimeGridView.tsx +246 -246
- package/apps/shared/components/calendar/allDay.ts +124 -124
- package/apps/shared/components/calendar/eventDialogFields.ts +3 -3
- package/apps/shared/components/calendar/eventForm.ts +3 -3
- package/apps/shared/components/calendar/eventFormat.ts +3 -3
- package/apps/shared/components/calendar/findTimeGrid.ts +2 -2
- package/apps/shared/components/calendar/layout/CalendarShell.tsx +11 -9
- package/apps/shared/components/contacts/ContactDetailPane.tsx +4 -4
- package/apps/shared/components/contacts/ContactForm.tsx +393 -383
- package/apps/shared/components/contacts/ContactsSidebar.tsx +7 -5
- package/apps/shared/components/contacts/ContactsToolbar.tsx +103 -103
- package/apps/shared/components/contacts/KeyChangeReview.tsx +5 -5
- package/apps/shared/components/contacts/contactKeys.ts +3 -3
- package/apps/shared/components/contacts/layout/ContactsShell.tsx +9 -7
- package/apps/shared/components/escrow/layout/EscrowShell.tsx +155 -155
- package/apps/shared/components/forms/StringListField.tsx +1 -1
- package/apps/shared/components/layout/AppShell.tsx +465 -461
- package/apps/shared/components/layout/BrandingChrome.tsx +1 -1
- package/apps/shared/components/layout/KeyEnrollmentGate.tsx +398 -398
- package/apps/shared/components/layout/MailboxProvisioning.tsx +170 -168
- package/apps/shared/components/layout/RecoveryCodeUnlock.tsx +9 -9
- package/apps/shared/components/layout/ResponsiveToolbar.tsx +315 -315
- package/apps/shared/components/layout/ThemeSwitch.tsx +84 -84
- package/apps/shared/components/layout/UnlockPromptProvider.tsx +6 -6
- package/apps/shared/components/layout/UserMenu.tsx +441 -439
- package/apps/shared/components/mail/ConversationList.tsx +334 -332
- package/apps/shared/components/mail/ConversationThreadPane.tsx +624 -613
- package/apps/shared/components/mail/InviteCard.tsx +11 -9
- package/apps/shared/components/mail/LazyReadingPane.tsx +2 -2
- package/apps/shared/components/mail/MailAddress.tsx +1 -1
- package/apps/shared/components/mail/MailListToolbar.tsx +2 -2
- package/apps/shared/components/mail/MailSelectionBar.tsx +240 -240
- package/apps/shared/components/mail/MenuButton.tsx +404 -404
- package/apps/shared/components/mail/MessageDetailPane.tsx +1759 -1757
- package/apps/shared/components/mail/MoveToFolderDialog.tsx +8 -6
- package/apps/shared/components/mail/OutboxRowStatus.tsx +1 -1
- package/apps/shared/components/mail/PermanentDeleteDialog.tsx +2 -2
- package/apps/shared/components/mail/compose/ComposeContext.tsx +323 -312
- package/apps/shared/components/mail/compose/ComposeToolbar.tsx +422 -422
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +1709 -1681
- package/apps/shared/components/mail/compose/ComposeWindowPlaceholder.tsx +4 -4
- package/apps/shared/components/mail/compose/EmojiPicker.tsx +2 -2
- package/apps/shared/components/mail/compose/GifPicker.tsx +3 -3
- package/apps/shared/components/mail/compose/RecipientInput.tsx +1 -1
- package/apps/shared/components/mail/compose/RichTextEditor.tsx +147 -147
- package/apps/shared/components/mail/compose/ScheduleSendPicker.tsx +1 -1
- package/apps/shared/components/mail/compose/composeFlushRegistry.ts +60 -60
- package/apps/shared/components/mail/compose/encryptionRequirement.ts +2 -2
- package/apps/shared/components/mail/compose/quotedBody.ts +161 -161
- package/apps/shared/components/mail/compose/recipients.ts +1 -1
- package/apps/shared/components/mail/invite/InviteRowChip.tsx +2 -2
- package/apps/shared/components/mail/invite/InviteRsvpPopover.tsx +9 -7
- package/apps/shared/components/mail/invite/InviteTimeline.tsx +1 -1
- package/apps/shared/components/mail/invite/ProposeTimeForm.tsx +2 -2
- package/apps/shared/components/mail/invite/inviteFormat.ts +2 -2
- package/apps/shared/components/mail/invite/inviteStore.ts +14 -6
- package/apps/shared/components/mail/labelMenu.tsx +9 -7
- package/apps/shared/components/mail/layout/MailShell.tsx +4 -4
- package/apps/shared/components/mail/listPreferences.ts +2 -2
- package/apps/shared/components/mail/pinnedSigners.ts +45 -19
- package/apps/shared/components/mail/reading/EncryptedBody.tsx +2 -2
- package/apps/shared/components/mail/reading/MessageBody.tsx +6 -6
- package/apps/shared/components/mail/reading/MessageCard.tsx +3 -3
- package/apps/shared/components/mail/reading/MessageMoreMenu.tsx +258 -258
- package/apps/shared/components/mail/reading/MessageSourceDialog.tsx +79 -79
- package/apps/shared/components/mail/reading/PendingMessageCard.tsx +1 -1
- package/apps/shared/components/mail/reading/bodyContent.ts +3 -3
- package/apps/shared/components/mail/reading/bodyHtml.ts +1 -1
- package/apps/shared/components/mail/reading/messageExport.ts +59 -59
- package/apps/shared/components/mail/reading/printMessage.ts +99 -99
- package/apps/shared/components/mail/reading/useMessageActions.ts +450 -443
- package/apps/shared/components/mail/unreadStyle.tsx +1 -1
- package/apps/shared/components/mail/verificationSeals.ts +129 -125
- package/apps/shared/components/mail/writableMailboxes.ts +14 -7
- package/apps/shared/components/rules/RuleBuilder.tsx +311 -311
- package/apps/shared/components/settings/SigningCertificateCard.tsx +344 -344
- package/apps/shared/components/settings/layout/SettingsShell.tsx +8 -6
- package/apps/shared/components/sharing/PrincipalListField.tsx +1 -1
- package/apps/shared/components/sharing/PrincipalPicker.tsx +1 -1
- package/apps/shared/components/sharing/PrincipalResolver.tsx +4 -4
- package/apps/shared/components/tasks/TasksSidebar.tsx +7 -5
- package/apps/shared/components/tasks/layout/TasksShell.tsx +9 -7
- package/apps/shared/keyboard/GlobalShortcuts.tsx +51 -51
- package/apps/shared/keyboard/ShortcutProvider.tsx +62 -62
- package/apps/shared/keyboard/ShortcutsDialog.tsx +84 -84
- package/apps/shared/keyboard/dispatch.ts +124 -124
- package/apps/shared/keyboard/format.ts +89 -89
- package/apps/shared/keyboard/keymap.ts +114 -114
- package/apps/shared/keyboard/registry.ts +65 -65
- package/apps/shared/keyboard/targets.ts +79 -79
- package/apps/shared/mail/findWellKnownFolderUid.ts +6 -4
- package/apps/shared/mail/folderCounts.ts +8 -4
- package/apps/shared/mail/folderOfType.ts +51 -49
- package/apps/shared/mail/folderTree.ts +143 -143
- package/apps/shared/mail/listAllPages.ts +39 -39
- package/apps/shared/mail/listSnapshots.ts +2 -2
- package/apps/shared/mail/messageReadState.ts +6 -5
- package/apps/shared/mail/newMailNotifications.ts +171 -171
- package/apps/shared/mail/outbox/composeBridge.ts +2 -2
- package/apps/shared/mail/outbox/outboxState.ts +1 -1
- package/apps/shared/mail/outbox/outgoingReplies.ts +2 -2
- package/apps/shared/mail/outbox/sendDecision.ts +2 -2
- package/apps/shared/mail/outbox/sendJob.ts +450 -445
- package/apps/shared/mail/outbox/sendOutcomes.ts +160 -155
- package/apps/shared/mail/outbox/useOutboxStatus.ts +5 -3
- package/apps/shared/mail/permanentDelete.ts +8 -7
- package/apps/shared/mail/primaryMailbox.ts +1 -1
- package/apps/shared/mail/reportNotices.ts +66 -66
- package/apps/shared/mail/senderBlocking.ts +157 -141
- package/apps/shared/mail/useMailConnection.ts +207 -205
- package/apps/shared/mail/useMailLiveUpdates.ts +277 -277
- package/apps/shared/mail/useMailboxUpdateAccess.ts +84 -60
- package/apps/shared/mail/useMarkMessageRead.ts +54 -47
- package/apps/shared/mail/useNewMailNotifications.ts +178 -178
- package/apps/shared/mail/usePermanentDelete.tsx +5 -3
- package/apps/shared/navigation/pageTitle.ts +1 -1
- package/apps/shared/notifications/NotificationCenter.tsx +1 -1
- package/apps/shared/notifications/NotificationHistoryDialog.tsx +2 -2
- package/apps/shared/notifications/apiErrors.ts +2 -2
- package/apps/shared/notifications/pushStatus.ts +1 -1
- package/apps/shared/notifications/store.ts +560 -560
- package/apps/shared/notifications/systemErrors.ts +1 -1
- package/apps/shared/search/LocalIndexLifecycle.tsx +120 -114
- package/apps/shared/search/crossMailboxSearch.ts +3 -3
- package/apps/shared/search/localIndexBuilder.ts +493 -481
- package/apps/shared/search/localIndexKey.ts +1 -1
- package/apps/shared/search/localIndexRpcClient.ts +150 -30
- package/apps/shared/search/localIndexTransport.ts +84 -0
- package/apps/shared/search/localIndexWorker.ts +1 -1
- package/apps/shared/search/searchTier2.ts +3 -3
- package/apps/shared/signing/enrollmentStorage.ts +33 -33
- package/apps/shared/signing/enrollmentTracker.ts +385 -385
- package/apps/shared/signing/enrollmentView.ts +251 -251
- package/apps/shared/signing/signingInfo.ts +1 -1
- package/apps/shared/signing/useNow.ts +19 -19
- package/apps/shared/signing/useSigningEnrollmentWatcher.ts +92 -90
- package/apps/shared/styles/app.css +387 -396
- package/apps/www/_layout.tsx +2 -2
- package/apps/www/calendar/index.tsx +583 -581
- package/apps/www/contacts/[uid].tsx +114 -112
- package/apps/www/contacts/index.tsx +19 -17
- package/apps/www/index.tsx +3021 -3012
- package/apps/www/messages/[uid].tsx +141 -139
- package/apps/www/settings/auto-reply/index.tsx +138 -136
- package/apps/www/settings/blocked-senders/index.tsx +305 -303
- package/apps/www/settings/encryption/index.tsx +1296 -1290
- package/apps/www/settings/filters/[uid].tsx +184 -179
- package/apps/www/settings/filters/_mailFilterRuleConfig.tsx +2 -2
- package/apps/www/settings/filters/index.tsx +105 -105
- package/apps/www/settings/filters/new/index.tsx +167 -165
- package/apps/www/settings/labels/index.tsx +209 -207
- package/apps/www/settings/privacy/index.tsx +499 -495
- package/apps/www/settings/profile/index.tsx +256 -251
- package/apps/www/settings/read-receipts/index.tsx +155 -150
- package/apps/www/settings/sharing/index.tsx +259 -259
- package/apps/www/settings/signatures/[uid].tsx +175 -175
- package/apps/www/settings/signatures/index.tsx +91 -91
- package/apps/www/settings/signatures/new/index.tsx +138 -138
- package/apps/www/settings/signatures/signatureDefaults.ts +1 -1
- package/apps/www/tasks/index.tsx +659 -654
- package/dist/apps/admin/_layout.d.ts +1 -1
- package/dist/apps/admin/_layout.js +1 -1
- package/dist/apps/admin/audit-log/index.d.ts +1 -1
- package/dist/apps/admin/audit-log/index.js +4 -4
- package/dist/apps/admin/branding/index.js +3 -3
- package/dist/apps/admin/data-requests/index.js +8 -8
- package/dist/apps/admin/distribution-lists/[uid].js +3 -3
- package/dist/apps/admin/distribution-lists/index.js +4 -4
- package/dist/apps/admin/distribution-lists/new/index.js +5 -5
- package/dist/apps/admin/domains/[uid].js +6 -6
- package/dist/apps/admin/domains/index.js +4 -4
- package/dist/apps/admin/domains/new/index.js +5 -5
- package/dist/apps/admin/encryption-policy/index.js +1 -1
- package/dist/apps/admin/escrow-scopes/[uid].d.ts +1 -1
- package/dist/apps/admin/escrow-scopes/[uid].js +7 -7
- package/dist/apps/admin/escrow-scopes/index.js +4 -4
- package/dist/apps/admin/escrow-scopes/new/index.js +5 -5
- package/dist/apps/admin/index.js +6 -6
- package/dist/apps/admin/ingest-queue/index.js +4 -4
- package/dist/apps/admin/mailbox-policy/index.js +1 -1
- package/dist/apps/admin/mailboxes/[uid].js +5 -5
- package/dist/apps/admin/quarantine/index.js +5 -5
- package/dist/apps/admin/retention-policy/index.js +3 -3
- package/dist/apps/admin/signing-certificates/index.js +5 -5
- package/dist/apps/admin/transport-rules/[uid].js +5 -5
- package/dist/apps/admin/transport-rules/_transportRuleConfig.d.ts +1 -1
- package/dist/apps/admin/transport-rules/_transportRuleConfig.js +2 -2
- package/dist/apps/admin/transport-rules/index.js +4 -4
- package/dist/apps/admin/transport-rules/new/index.js +5 -5
- package/dist/apps/escrow/_layout.d.ts +1 -1
- package/dist/apps/escrow/audit-log/index.d.ts +1 -1
- package/dist/apps/escrow/audit-log/index.js +4 -4
- package/dist/apps/escrow/index.js +4 -4
- package/dist/apps/escrow/matters/[uid].js +10 -10
- package/dist/apps/escrow/matters/new/index.js +6 -6
- package/dist/apps/shared/appearance/AppearanceForm.js +3 -3
- package/dist/apps/shared/appearance/AppearanceHead.js +1 -1
- package/dist/apps/shared/appearance/AppearanceProvider.d.ts +1 -1
- package/dist/apps/shared/appearance/AppearanceProvider.js +3 -3
- package/dist/apps/shared/appearance/appearanceCache.d.ts +1 -1
- package/dist/apps/shared/appearance/appearanceCache.js +1 -1
- package/dist/apps/shared/appearance/appearanceContext.d.ts +1 -1
- package/dist/apps/shared/appearance/theme.d.ts +1 -1
- package/dist/apps/shared/auth/adminAccess.js +1 -1
- package/dist/apps/shared/calendar/bookingPlugin.js +1 -1
- package/dist/apps/shared/calendar/calendarLiveUpdates.d.ts +1 -1
- package/dist/apps/shared/calendar/calendarReminders.d.ts +1 -1
- package/dist/apps/shared/calendar/useCalendarReminders.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/DiagnosticsManager.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/InstalledPlugins.d.ts +1 -1
- package/dist/apps/shared/components/admin/diagnostics/InstalledPlugins.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/LogsPanel.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/PackagesTable.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/RuntimePanel.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/SystemPanel.js +2 -2
- package/dist/apps/shared/components/admin/diagnostics/VersionsPanel.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/diagnosticsApi.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/format.js +1 -1
- package/dist/apps/shared/components/admin/diagnostics/logClient.js +1 -1
- package/dist/apps/shared/components/admin/distributionLists/MemberListCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/distributionLists/MemberListCard.js +4 -4
- package/dist/apps/shared/components/admin/elevation.js +1 -1
- package/dist/apps/shared/components/admin/escrowScopes/EscrowScopeKeyAndHoldersFields.js +3 -3
- package/dist/apps/shared/components/admin/layout/AdminShell.d.ts +1 -1
- package/dist/apps/shared/components/admin/layout/AdminShell.js +8 -8
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.js +6 -6
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/EscrowScopeCard.js +10 -8
- package/dist/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.js +4 -4
- package/dist/apps/shared/components/admin/mailboxes/MailboxTable.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.d.ts +1 -1
- package/dist/apps/shared/components/admin/mailboxes/ResourceSettingsCard.js +7 -5
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.js +5 -5
- package/dist/apps/shared/components/admin/settings/BrandingForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +8 -8
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.js +5 -5
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.js +4 -4
- package/dist/apps/shared/components/admin/settings/LoadedSettingsForm.js +2 -2
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.js +14 -12
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.js +4 -4
- package/dist/apps/shared/components/admin/settings/PluginsManager.js +5 -5
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.d.ts +1 -1
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.js +5 -5
- package/dist/apps/shared/components/admin/setup/EscrowSetupStep.js +7 -7
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +26 -22
- package/dist/apps/shared/components/admin/signOut.js +1 -1
- package/dist/apps/shared/components/admin/usePagedList.js +2 -2
- package/dist/apps/shared/components/calendar/AppointmentQuickForm.js +3 -3
- package/dist/apps/shared/components/calendar/CalendarListSidebar.d.ts +1 -1
- package/dist/apps/shared/components/calendar/CalendarListSidebar.js +2 -2
- package/dist/apps/shared/components/calendar/DescriptionEditor.js +1 -1
- package/dist/apps/shared/components/calendar/EventDescriptionView.js +1 -1
- package/dist/apps/shared/components/calendar/EventDetails.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventDetails.js +16 -14
- package/dist/apps/shared/components/calendar/EventEditor.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventEditor.js +22 -20
- package/dist/apps/shared/components/calendar/EventExpandedForm.js +2 -2
- package/dist/apps/shared/components/calendar/EventFormParts.d.ts +1 -1
- package/dist/apps/shared/components/calendar/EventFormParts.js +1 -1
- package/dist/apps/shared/components/calendar/EventModal.d.ts +2 -2
- package/dist/apps/shared/components/calendar/EventModal.js +3 -3
- package/dist/apps/shared/components/calendar/EventQuickForm.js +3 -3
- package/dist/apps/shared/components/calendar/EventShell.js +1 -1
- package/dist/apps/shared/components/calendar/FindATime.js +6 -4
- package/dist/apps/shared/components/calendar/GuestInput.d.ts +2 -2
- package/dist/apps/shared/components/calendar/MonthView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/MonthView.js +1 -1
- package/dist/apps/shared/components/calendar/QuickCreateFaces.js +1 -1
- package/dist/apps/shared/components/calendar/QuickFaceFrame.js +1 -1
- package/dist/apps/shared/components/calendar/RecurrenceEditor.d.ts +1 -1
- package/dist/apps/shared/components/calendar/RecurrenceEditor.js +1 -1
- package/dist/apps/shared/components/calendar/RequestChangeForm.js +8 -6
- package/dist/apps/shared/components/calendar/ResourcePicker.d.ts +1 -1
- package/dist/apps/shared/components/calendar/ResourcePicker.js +7 -5
- package/dist/apps/shared/components/calendar/SplitDayView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TaskQuickForm.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TaskQuickForm.js +9 -7
- package/dist/apps/shared/components/calendar/TimeGridView.d.ts +1 -1
- package/dist/apps/shared/components/calendar/TimeGridView.js +1 -1
- package/dist/apps/shared/components/calendar/allDay.d.ts +2 -2
- package/dist/apps/shared/components/calendar/allDay.js +1 -1
- package/dist/apps/shared/components/calendar/eventDialogFields.d.ts +2 -2
- package/dist/apps/shared/components/calendar/eventDialogFields.js +2 -2
- package/dist/apps/shared/components/calendar/eventForm.d.ts +3 -3
- package/dist/apps/shared/components/calendar/eventFormat.d.ts +1 -1
- package/dist/apps/shared/components/calendar/eventFormat.js +2 -2
- package/dist/apps/shared/components/calendar/findTimeGrid.d.ts +1 -1
- package/dist/apps/shared/components/calendar/findTimeGrid.js +1 -1
- package/dist/apps/shared/components/calendar/layout/CalendarShell.d.ts +1 -1
- package/dist/apps/shared/components/calendar/layout/CalendarShell.js +11 -9
- package/dist/apps/shared/components/contacts/ContactDetailPane.d.ts +1 -1
- package/dist/apps/shared/components/contacts/ContactDetailPane.js +2 -2
- package/dist/apps/shared/components/contacts/ContactForm.d.ts +2 -2
- package/dist/apps/shared/components/contacts/ContactForm.js +12 -8
- package/dist/apps/shared/components/contacts/ContactsSidebar.d.ts +1 -1
- package/dist/apps/shared/components/contacts/ContactsSidebar.js +7 -5
- package/dist/apps/shared/components/contacts/KeyChangeReview.d.ts +1 -1
- package/dist/apps/shared/components/contacts/KeyChangeReview.js +5 -5
- package/dist/apps/shared/components/contacts/contactKeys.d.ts +2 -2
- package/dist/apps/shared/components/contacts/contactKeys.js +2 -2
- package/dist/apps/shared/components/contacts/layout/ContactsShell.d.ts +1 -1
- package/dist/apps/shared/components/contacts/layout/ContactsShell.js +9 -7
- package/dist/apps/shared/components/escrow/layout/EscrowShell.js +7 -7
- package/dist/apps/shared/components/forms/StringListField.js +1 -1
- package/dist/apps/shared/components/layout/AppShell.d.ts +2 -2
- package/dist/apps/shared/components/layout/AppShell.js +14 -10
- package/dist/apps/shared/components/layout/BrandingChrome.d.ts +1 -1
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.d.ts +1 -1
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.js +9 -9
- package/dist/apps/shared/components/layout/MailboxProvisioning.js +8 -6
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.d.ts +1 -1
- package/dist/apps/shared/components/layout/RecoveryCodeUnlock.js +9 -9
- package/dist/apps/shared/components/layout/UnlockPromptProvider.d.ts +2 -2
- package/dist/apps/shared/components/layout/UnlockPromptProvider.js +5 -5
- package/dist/apps/shared/components/layout/UserMenu.js +6 -4
- package/dist/apps/shared/components/mail/ConversationList.d.ts +2 -2
- package/dist/apps/shared/components/mail/ConversationList.js +6 -4
- package/dist/apps/shared/components/mail/ConversationThreadPane.d.ts +3 -3
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +13 -11
- package/dist/apps/shared/components/mail/InviteCard.js +10 -8
- package/dist/apps/shared/components/mail/LazyReadingPane.js +2 -2
- package/dist/apps/shared/components/mail/MailAddress.d.ts +1 -1
- package/dist/apps/shared/components/mail/MailAddress.js +1 -1
- package/dist/apps/shared/components/mail/MailListToolbar.d.ts +2 -2
- package/dist/apps/shared/components/mail/MailSelectionBar.d.ts +2 -2
- package/dist/apps/shared/components/mail/MenuButton.js +1 -1
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +3 -3
- package/dist/apps/shared/components/mail/MessageDetailPane.js +30 -28
- package/dist/apps/shared/components/mail/MoveToFolderDialog.d.ts +1 -1
- package/dist/apps/shared/components/mail/MoveToFolderDialog.js +8 -6
- package/dist/apps/shared/components/mail/OutboxRowStatus.d.ts +1 -1
- package/dist/apps/shared/components/mail/PermanentDeleteDialog.js +2 -2
- package/dist/apps/shared/components/mail/compose/ComposeContext.d.ts +10 -1
- package/dist/apps/shared/components/mail/compose/ComposeContext.js +4 -2
- package/dist/apps/shared/components/mail/compose/ComposeWindow.d.ts +7 -1
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +54 -31
- package/dist/apps/shared/components/mail/compose/ComposeWindowPlaceholder.js +4 -4
- package/dist/apps/shared/components/mail/compose/EmojiPicker.js +2 -2
- package/dist/apps/shared/components/mail/compose/GifPicker.js +3 -3
- package/dist/apps/shared/components/mail/compose/RecipientInput.d.ts +1 -1
- package/dist/apps/shared/components/mail/compose/RecipientInput.js +1 -1
- package/dist/apps/shared/components/mail/compose/ScheduleSendPicker.js +1 -1
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.d.ts +2 -2
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.js +1 -1
- package/dist/apps/shared/components/mail/compose/quotedBody.d.ts +3 -3
- package/dist/apps/shared/components/mail/compose/quotedBody.js +3 -3
- package/dist/apps/shared/components/mail/compose/recipients.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRowChip.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRsvpPopover.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/InviteRsvpPopover.js +9 -7
- package/dist/apps/shared/components/mail/invite/InviteTimeline.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/ProposeTimeForm.d.ts +1 -1
- package/dist/apps/shared/components/mail/invite/ProposeTimeForm.js +1 -1
- package/dist/apps/shared/components/mail/invite/inviteFormat.d.ts +2 -2
- package/dist/apps/shared/components/mail/invite/inviteStore.d.ts +9 -3
- package/dist/apps/shared/components/mail/invite/inviteStore.js +13 -6
- package/dist/apps/shared/components/mail/labelMenu.d.ts +1 -1
- package/dist/apps/shared/components/mail/labelMenu.js +9 -7
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +1 -1
- package/dist/apps/shared/components/mail/layout/MailShell.js +3 -3
- package/dist/apps/shared/components/mail/listPreferences.d.ts +2 -2
- package/dist/apps/shared/components/mail/listPreferences.js +1 -1
- package/dist/apps/shared/components/mail/pinnedSigners.d.ts +12 -5
- package/dist/apps/shared/components/mail/pinnedSigners.js +37 -18
- package/dist/apps/shared/components/mail/reading/EncryptedBody.js +2 -2
- package/dist/apps/shared/components/mail/reading/MessageBody.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/MessageBody.js +4 -4
- package/dist/apps/shared/components/mail/reading/MessageCard.d.ts +1 -1
- package/dist/apps/shared/components/mail/reading/MessageCard.js +2 -2
- package/dist/apps/shared/components/mail/reading/MessageSourceDialog.js +3 -3
- package/dist/apps/shared/components/mail/reading/PendingMessageCard.js +1 -1
- package/dist/apps/shared/components/mail/reading/bodyContent.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/bodyContent.js +2 -2
- package/dist/apps/shared/components/mail/reading/bodyHtml.js +1 -1
- package/dist/apps/shared/components/mail/reading/messageExport.js +1 -1
- package/dist/apps/shared/components/mail/reading/printMessage.d.ts +2 -2
- package/dist/apps/shared/components/mail/reading/printMessage.js +11 -11
- package/dist/apps/shared/components/mail/reading/useMessageActions.d.ts +1 -1
- package/dist/apps/shared/components/mail/reading/useMessageActions.js +18 -16
- package/dist/apps/shared/components/mail/unreadStyle.d.ts +1 -1
- package/dist/apps/shared/components/mail/verificationSeals.d.ts +27 -6
- package/dist/apps/shared/components/mail/verificationSeals.js +15 -11
- package/dist/apps/shared/components/mail/writableMailboxes.d.ts +8 -3
- package/dist/apps/shared/components/mail/writableMailboxes.js +12 -6
- package/dist/apps/shared/components/rules/RuleBuilder.js +1 -1
- package/dist/apps/shared/components/settings/SigningCertificateCard.d.ts +1 -1
- package/dist/apps/shared/components/settings/SigningCertificateCard.js +3 -3
- package/dist/apps/shared/components/settings/layout/SettingsShell.d.ts +1 -1
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +8 -6
- package/dist/apps/shared/components/sharing/PrincipalListField.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalPicker.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalPicker.js +1 -1
- package/dist/apps/shared/components/sharing/PrincipalResolver.d.ts +1 -1
- package/dist/apps/shared/components/sharing/PrincipalResolver.js +3 -3
- package/dist/apps/shared/components/tasks/TasksSidebar.d.ts +1 -1
- package/dist/apps/shared/components/tasks/TasksSidebar.js +7 -5
- package/dist/apps/shared/components/tasks/layout/TasksShell.d.ts +1 -1
- package/dist/apps/shared/components/tasks/layout/TasksShell.js +9 -7
- package/dist/apps/shared/keyboard/ShortcutsDialog.js +1 -1
- package/dist/apps/shared/mail/findWellKnownFolderUid.d.ts +5 -3
- package/dist/apps/shared/mail/findWellKnownFolderUid.js +5 -4
- package/dist/apps/shared/mail/folderCounts.d.ts +1 -1
- package/dist/apps/shared/mail/folderCounts.js +6 -4
- package/dist/apps/shared/mail/folderOfType.d.ts +3 -2
- package/dist/apps/shared/mail/folderOfType.js +4 -4
- package/dist/apps/shared/mail/folderTree.d.ts +1 -1
- package/dist/apps/shared/mail/listSnapshots.d.ts +2 -2
- package/dist/apps/shared/mail/messageReadState.d.ts +4 -3
- package/dist/apps/shared/mail/messageReadState.js +5 -5
- package/dist/apps/shared/mail/newMailNotifications.d.ts +1 -1
- package/dist/apps/shared/mail/newMailNotifications.js +1 -1
- package/dist/apps/shared/mail/outbox/composeBridge.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/outboxState.d.ts +1 -1
- package/dist/apps/shared/mail/outbox/outgoingReplies.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/sendDecision.d.ts +2 -2
- package/dist/apps/shared/mail/outbox/sendDecision.js +1 -1
- package/dist/apps/shared/mail/outbox/sendJob.d.ts +10 -6
- package/dist/apps/shared/mail/outbox/sendJob.js +39 -35
- package/dist/apps/shared/mail/outbox/sendOutcomes.d.ts +6 -3
- package/dist/apps/shared/mail/outbox/sendOutcomes.js +19 -15
- package/dist/apps/shared/mail/outbox/useOutboxStatus.js +5 -3
- package/dist/apps/shared/mail/permanentDelete.d.ts +4 -3
- package/dist/apps/shared/mail/permanentDelete.js +8 -8
- package/dist/apps/shared/mail/primaryMailbox.d.ts +1 -1
- package/dist/apps/shared/mail/primaryMailbox.js +1 -1
- package/dist/apps/shared/mail/reportNotices.d.ts +1 -1
- package/dist/apps/shared/mail/senderBlocking.d.ts +5 -4
- package/dist/apps/shared/mail/senderBlocking.js +19 -16
- package/dist/apps/shared/mail/useMailConnection.d.ts +1 -1
- package/dist/apps/shared/mail/useMailConnection.js +12 -10
- package/dist/apps/shared/mail/useMailLiveUpdates.d.ts +2 -2
- package/dist/apps/shared/mail/useMailLiveUpdates.js +2 -2
- package/dist/apps/shared/mail/useMailboxUpdateAccess.d.ts +3 -2
- package/dist/apps/shared/mail/useMailboxUpdateAccess.js +31 -10
- package/dist/apps/shared/mail/useMarkMessageRead.d.ts +1 -1
- package/dist/apps/shared/mail/useMarkMessageRead.js +5 -3
- package/dist/apps/shared/mail/useNewMailNotifications.d.ts +1 -1
- package/dist/apps/shared/mail/usePermanentDelete.d.ts +1 -1
- package/dist/apps/shared/mail/usePermanentDelete.js +4 -2
- package/dist/apps/shared/navigation/pageTitle.d.ts +1 -1
- package/dist/apps/shared/notifications/NotificationCenter.js +1 -1
- package/dist/apps/shared/notifications/NotificationHistoryDialog.js +2 -2
- package/dist/apps/shared/notifications/apiErrors.js +2 -2
- package/dist/apps/shared/notifications/pushStatus.js +1 -1
- package/dist/apps/shared/notifications/systemErrors.js +1 -1
- package/dist/apps/shared/search/LocalIndexLifecycle.d.ts +2 -2
- package/dist/apps/shared/search/LocalIndexLifecycle.js +15 -10
- package/dist/apps/shared/search/crossMailboxSearch.d.ts +1 -1
- package/dist/apps/shared/search/crossMailboxSearch.js +2 -2
- package/dist/apps/shared/search/localIndexBuilder.d.ts +4 -3
- package/dist/apps/shared/search/localIndexBuilder.js +15 -12
- package/dist/apps/shared/search/localIndexKey.js +1 -1
- package/dist/apps/shared/search/localIndexRpcClient.d.ts +43 -31
- package/dist/apps/shared/search/localIndexRpcClient.js +113 -20
- package/dist/apps/shared/search/localIndexTransport.d.ts +77 -0
- package/dist/apps/shared/search/localIndexTransport.js +1 -0
- package/dist/apps/shared/search/localIndexWorker.d.ts +1 -1
- package/dist/apps/shared/search/searchTier2.d.ts +3 -3
- package/dist/apps/shared/signing/enrollmentTracker.d.ts +1 -1
- package/dist/apps/shared/signing/enrollmentTracker.js +3 -3
- package/dist/apps/shared/signing/enrollmentView.d.ts +1 -1
- package/dist/apps/shared/signing/signingInfo.d.ts +1 -1
- package/dist/apps/shared/signing/signingInfo.js +1 -1
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.d.ts +1 -1
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.js +5 -3
- package/dist/apps/shared/styles/app.css +387 -396
- package/dist/apps/www/_layout.d.ts +1 -1
- package/dist/apps/www/_layout.js +1 -1
- package/dist/apps/www/calendar/index.d.ts +1 -1
- package/dist/apps/www/calendar/index.js +20 -18
- package/dist/apps/www/contacts/[uid].d.ts +1 -1
- package/dist/apps/www/contacts/[uid].js +8 -6
- package/dist/apps/www/contacts/index.d.ts +1 -1
- package/dist/apps/www/contacts/index.js +19 -17
- package/dist/apps/www/index.d.ts +1 -1
- package/dist/apps/www/index.js +54 -50
- package/dist/apps/www/messages/[uid].d.ts +1 -1
- package/dist/apps/www/messages/[uid].js +11 -9
- package/dist/apps/www/settings/appearance/index.d.ts +1 -1
- package/dist/apps/www/settings/auto-reply/index.d.ts +1 -1
- package/dist/apps/www/settings/auto-reply/index.js +6 -4
- package/dist/apps/www/settings/blocked-senders/index.d.ts +1 -1
- package/dist/apps/www/settings/blocked-senders/index.js +6 -4
- package/dist/apps/www/settings/encryption/index.d.ts +1 -1
- package/dist/apps/www/settings/encryption/index.js +31 -29
- package/dist/apps/www/settings/filters/[uid].d.ts +1 -1
- package/dist/apps/www/settings/filters/[uid].js +11 -9
- package/dist/apps/www/settings/filters/_mailFilterRuleConfig.d.ts +2 -2
- package/dist/apps/www/settings/filters/index.d.ts +1 -1
- package/dist/apps/www/settings/filters/index.js +4 -4
- package/dist/apps/www/settings/filters/new/index.d.ts +1 -1
- package/dist/apps/www/settings/filters/new/index.js +10 -8
- package/dist/apps/www/settings/labels/index.d.ts +1 -1
- package/dist/apps/www/settings/labels/index.js +12 -10
- package/dist/apps/www/settings/privacy/index.d.ts +1 -1
- package/dist/apps/www/settings/privacy/index.js +18 -14
- package/dist/apps/www/settings/profile/index.d.ts +1 -1
- package/dist/apps/www/settings/profile/index.js +7 -5
- package/dist/apps/www/settings/read-receipts/index.d.ts +1 -1
- package/dist/apps/www/settings/read-receipts/index.js +5 -3
- package/dist/apps/www/settings/sharing/index.d.ts +1 -1
- package/dist/apps/www/settings/sharing/index.js +6 -6
- package/dist/apps/www/settings/signatures/[uid].d.ts +1 -1
- package/dist/apps/www/settings/signatures/[uid].js +5 -5
- package/dist/apps/www/settings/signatures/index.d.ts +1 -1
- package/dist/apps/www/settings/signatures/index.js +4 -4
- package/dist/apps/www/settings/signatures/new/index.d.ts +1 -1
- package/dist/apps/www/settings/signatures/new/index.js +4 -4
- package/dist/apps/www/settings/signatures/signatureDefaults.d.ts +1 -1
- package/dist/apps/www/settings/signatures/signatureDefaults.js +1 -1
- package/dist/apps/www/tasks/index.d.ts +1 -1
- package/dist/apps/www/tasks/index.js +17 -15
- package/dist/lib/admin/auditLogApi.d.ts +32 -0
- package/dist/lib/admin/auditLogApi.js +27 -0
- package/dist/lib/admin/distributionListsApi.d.ts +47 -0
- package/dist/lib/admin/distributionListsApi.js +34 -0
- package/dist/lib/admin/domainsApi.d.ts +75 -0
- package/dist/lib/admin/domainsApi.js +44 -0
- package/dist/lib/admin/escrowAccessRequestsApi.d.ts +79 -0
- package/dist/lib/admin/escrowAccessRequestsApi.js +46 -0
- package/dist/lib/admin/escrowAuditLogApi.d.ts +66 -0
- package/dist/lib/admin/escrowAuditLogApi.js +31 -0
- package/dist/lib/admin/escrowScopesApi.d.ts +78 -0
- package/dist/lib/admin/escrowScopesApi.js +50 -0
- package/dist/lib/admin/leftoverMailboxApi.d.ts +73 -0
- package/dist/lib/admin/leftoverMailboxApi.js +67 -0
- package/dist/lib/admin/mailboxPolicyApi.d.ts +27 -0
- package/dist/lib/admin/mailboxPolicyApi.js +21 -0
- package/dist/lib/admin/matterExportApi.d.ts +40 -0
- package/dist/lib/admin/matterExportApi.js +39 -0
- package/dist/lib/admin/matterSearchApi.d.ts +20 -0
- package/dist/lib/admin/matterSearchApi.js +27 -0
- package/dist/lib/admin/mattersApi.d.ts +56 -0
- package/dist/lib/admin/mattersApi.js +40 -0
- package/dist/lib/admin/pluginsApi.d.ts +265 -0
- package/dist/lib/admin/pluginsApi.js +102 -0
- package/dist/lib/admin/retentionPolicyApi.d.ts +32 -0
- package/dist/lib/admin/retentionPolicyApi.js +29 -0
- package/dist/lib/admin/setupApi.d.ts +23 -0
- package/dist/lib/admin/setupApi.js +26 -0
- package/dist/lib/admin/transportRulesApi.d.ts +66 -0
- package/dist/lib/admin/transportRulesApi.js +43 -0
- package/dist/lib/appearance/preferencesApi.d.ts +128 -0
- package/dist/lib/appearance/preferencesApi.js +257 -0
- package/dist/lib/auth/profileApi.d.ts +33 -0
- package/dist/lib/auth/profileApi.js +52 -0
- package/dist/lib/auth/session.d.ts +70 -0
- package/dist/lib/auth/session.js +210 -0
- package/dist/lib/branding/brandingApi.d.ts +47 -0
- package/dist/lib/branding/brandingApi.js +61 -0
- package/dist/lib/branding/useBranding.d.ts +23 -0
- package/dist/lib/branding/useBranding.js +65 -0
- package/dist/lib/calendar/calendarApi.d.ts +230 -0
- package/dist/lib/calendar/calendarApi.js +106 -0
- package/dist/lib/calendar/calendarColors.d.ts +18 -0
- package/dist/lib/calendar/calendarColors.js +39 -0
- package/dist/lib/calendar/calendarDragIds.d.ts +42 -0
- package/dist/lib/calendar/calendarDragIds.js +92 -0
- package/dist/lib/calendar/calendarMutations.d.ts +68 -0
- package/dist/lib/calendar/calendarMutations.js +190 -0
- package/dist/lib/calendar/eventDescription.d.ts +43 -0
- package/dist/lib/calendar/eventDescription.js +195 -0
- package/dist/lib/calendar/freeBusyApi.d.ts +100 -0
- package/dist/lib/calendar/freeBusyApi.js +119 -0
- package/dist/lib/calendar/inviteApi.d.ts +121 -0
- package/dist/lib/calendar/inviteApi.js +54 -0
- package/dist/lib/calendar/recurrence.d.ts +60 -0
- package/dist/lib/calendar/recurrence.js +225 -0
- package/dist/lib/components/avatar/ContactAvatar.d.ts +8 -0
- package/dist/lib/components/avatar/ContactAvatar.js +26 -0
- package/dist/lib/components/buttons/Button.d.ts +9 -0
- package/dist/lib/components/buttons/Button.js +14 -0
- package/dist/lib/components/buttons/CopyButton.d.ts +18 -0
- package/dist/lib/components/buttons/CopyButton.js +14 -0
- package/dist/lib/components/feedback/Alert.d.ts +4 -0
- package/dist/lib/components/feedback/Alert.js +4 -0
- package/dist/lib/components/feedback/Skeleton.d.ts +21 -0
- package/dist/lib/components/feedback/Skeleton.js +14 -0
- package/dist/lib/components/forms/FormField.d.ts +8 -0
- package/dist/lib/components/forms/FormField.js +5 -0
- package/dist/lib/components/navigation/BottomTabBar.d.ts +27 -0
- package/dist/lib/components/navigation/BottomTabBar.js +32 -0
- package/dist/lib/components/overlays/Drawer.d.ts +20 -0
- package/dist/lib/components/overlays/Drawer.js +27 -0
- package/dist/lib/components/overlays/Modal.d.ts +17 -0
- package/dist/lib/components/overlays/Modal.js +25 -0
- package/dist/lib/components/overlays/PopoverPortal.d.ts +23 -0
- package/dist/lib/components/overlays/PopoverPortal.js +53 -0
- package/dist/lib/components/overlays/overlayStack.d.ts +31 -0
- package/dist/lib/components/overlays/overlayStack.js +143 -0
- package/dist/lib/components/pickers/MiniDatePicker.d.ts +13 -0
- package/dist/lib/components/pickers/MiniDatePicker.js +42 -0
- package/dist/lib/contacts/contactsApi.d.ts +174 -0
- package/dist/lib/contacts/contactsApi.js +139 -0
- package/dist/lib/contacts/vcard.d.ts +23 -0
- package/dist/lib/contacts/vcard.js +179 -0
- package/dist/lib/crypto/composeSecurity.d.ts +67 -0
- package/dist/lib/crypto/composeSecurity.js +93 -0
- package/dist/lib/crypto/encoding.d.ts +9 -0
- package/dist/lib/crypto/encoding.js +32 -0
- package/dist/lib/crypto/escrowKeys.d.ts +25 -0
- package/dist/lib/crypto/escrowKeys.js +59 -0
- package/dist/lib/crypto/idleTimeout.d.ts +16 -0
- package/dist/lib/crypto/idleTimeout.js +47 -0
- package/dist/lib/crypto/keySession.d.ts +159 -0
- package/dist/lib/crypto/keySession.js +367 -0
- package/dist/lib/crypto/keys.d.ts +50 -0
- package/dist/lib/crypto/keys.js +89 -0
- package/dist/lib/crypto/keyvaultApi.d.ts +394 -0
- package/dist/lib/crypto/keyvaultApi.js +350 -0
- package/dist/lib/crypto/masterKey.d.ts +59 -0
- package/dist/lib/crypto/masterKey.js +104 -0
- package/dist/lib/crypto/masterKeyWraps.d.ts +108 -0
- package/dist/lib/crypto/masterKeyWraps.js +228 -0
- package/dist/lib/crypto/messageSecurity.d.ts +248 -0
- package/dist/lib/crypto/messageSecurity.js +367 -0
- package/dist/lib/crypto/mime.d.ts +143 -0
- package/dist/lib/crypto/mime.js +504 -0
- package/dist/lib/crypto/passkeyUnlock.d.ts +20 -0
- package/dist/lib/crypto/passkeyUnlock.js +79 -0
- package/dist/lib/crypto/passwordUnlock.d.ts +39 -0
- package/dist/lib/crypto/passwordUnlock.js +73 -0
- package/dist/lib/crypto/recoveryCode.d.ts +28 -0
- package/dist/lib/crypto/recoveryCode.js +86 -0
- package/dist/lib/crypto/signingProviderApi.d.ts +95 -0
- package/dist/lib/crypto/signingProviderApi.js +60 -0
- package/dist/lib/crypto/smime.d.ts +128 -0
- package/dist/lib/crypto/smime.js +402 -0
- package/dist/lib/crypto/smimeMessage.d.ts +132 -0
- package/dist/lib/crypto/smimeMessage.js +341 -0
- package/dist/lib/crypto/useIdleKeyTimeout.d.ts +10 -0
- package/dist/lib/crypto/useIdleKeyTimeout.js +163 -0
- package/dist/lib/crypto/verificationSeal.d.ts +56 -0
- package/dist/lib/crypto/verificationSeal.js +220 -0
- package/dist/lib/mail/compose/composeQuoting.d.ts +88 -0
- package/dist/lib/mail/compose/composeQuoting.js +204 -0
- package/dist/lib/mail/compose/emojiData.d.ts +9 -0
- package/dist/lib/mail/compose/emojiData.js +18 -0
- package/dist/lib/mail/compose/giphyApi.d.ts +17 -0
- package/dist/lib/mail/compose/giphyApi.js +20 -0
- package/dist/lib/mail/conversationsApi.d.ts +80 -0
- package/dist/lib/mail/conversationsApi.js +44 -0
- package/dist/lib/mail/dataExportApi.d.ts +50 -0
- package/dist/lib/mail/dataExportApi.js +40 -0
- package/dist/lib/mail/directoryApi.d.ts +49 -0
- package/dist/lib/mail/directoryApi.js +101 -0
- package/dist/lib/mail/erasureRequestApi.d.ts +45 -0
- package/dist/lib/mail/erasureRequestApi.js +43 -0
- package/dist/lib/mail/flaggedMessages.d.ts +22 -0
- package/dist/lib/mail/flaggedMessages.js +73 -0
- package/dist/lib/mail/focusedInboxOverridesApi.d.ts +37 -0
- package/dist/lib/mail/focusedInboxOverridesApi.js +34 -0
- package/dist/lib/mail/labelsApi.d.ts +47 -0
- package/dist/lib/mail/labelsApi.js +38 -0
- package/dist/lib/mail/mailAddress.d.ts +27 -0
- package/dist/lib/mail/mailAddress.js +54 -0
- package/dist/lib/mail/mailApi.d.ts +850 -0
- package/dist/lib/mail/mailApi.js +602 -0
- package/dist/lib/mail/mailDetailHooks.d.ts +10 -0
- package/dist/lib/mail/mailDetailHooks.js +53 -0
- package/dist/lib/mail/mailFilterRulesApi.d.ts +76 -0
- package/dist/lib/mail/mailFilterRulesApi.js +45 -0
- package/dist/lib/mail/mailSignaturesApi.d.ts +49 -0
- package/dist/lib/mail/mailSignaturesApi.js +42 -0
- package/dist/lib/mail/mailboxAccessApi.d.ts +74 -0
- package/dist/lib/mail/mailboxAccessApi.js +56 -0
- package/dist/lib/mail/mailboxImportApi.d.ts +53 -0
- package/dist/lib/mail/mailboxImportApi.js +51 -0
- package/dist/lib/mail/messageBodySanitizer.d.ts +16 -0
- package/dist/lib/mail/messageBodySanitizer.js +118 -0
- package/dist/lib/mail/pushClient.d.ts +106 -0
- package/dist/lib/mail/pushClient.js +317 -0
- package/dist/lib/mail/sendEvents.d.ts +33 -0
- package/dist/lib/mail/sendEvents.js +44 -0
- package/dist/lib/mail/sendFailure.d.ts +16 -0
- package/dist/lib/mail/sendFailure.js +86 -0
- package/dist/lib/mail/senderListsApi.d.ts +69 -0
- package/dist/lib/mail/senderListsApi.js +126 -0
- package/dist/lib/search/queryGrammar.d.ts +51 -0
- package/dist/lib/search/queryGrammar.js +111 -0
- package/dist/lib/search/searchApi.d.ts +100 -0
- package/dist/lib/search/searchApi.js +107 -0
- package/dist/lib/search/searchScoring.d.ts +34 -0
- package/dist/lib/search/searchScoring.js +44 -0
- package/dist/lib/search/searchTier3.d.ts +64 -0
- package/dist/lib/search/searchTier3.js +335 -0
- package/dist/lib/tasks/tasksApi.d.ts +85 -0
- package/dist/lib/tasks/tasksApi.js +55 -0
- package/dist/lib/util/api.d.ts +160 -0
- package/dist/lib/util/api.js +251 -0
- package/dist/lib/util/apiClientContext.d.ts +7 -0
- package/dist/lib/util/apiClientContext.js +32 -0
- package/dist/lib/util/apiQuery.d.ts +32 -0
- package/dist/lib/util/apiQuery.js +42 -0
- package/dist/lib/util/clipboard.d.ts +7 -0
- package/dist/lib/util/clipboard.js +56 -0
- package/dist/lib/util/dateInput.d.ts +6 -0
- package/dist/lib/util/dateInput.js +14 -0
- package/dist/lib/util/timeZone.d.ts +12 -0
- package/dist/lib/util/timeZone.js +32 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +12 -0
- package/dist/lib/util/useCopyToClipboard.js +34 -0
- package/dist/lib/util/useIsMobile.d.ts +10 -0
- package/dist/lib/util/useIsMobile.js +29 -0
- package/dist/lib/videoconf/videoMeetingsApi.d.ts +116 -0
- package/dist/lib/videoconf/videoMeetingsApi.js +49 -0
- package/lib/admin/auditLogApi.ts +48 -0
- package/lib/admin/distributionListsApi.ts +77 -0
- package/lib/admin/domainsApi.ts +113 -0
- package/lib/admin/escrowAccessRequestsApi.ts +110 -0
- package/lib/admin/escrowAuditLogApi.ts +101 -0
- package/lib/admin/escrowScopesApi.ts +112 -0
- package/lib/admin/leftoverMailboxApi.ts +120 -0
- package/lib/admin/mailboxPolicyApi.ts +38 -0
- package/lib/admin/matterExportApi.ts +62 -0
- package/lib/admin/matterSearchApi.ts +35 -0
- package/lib/admin/mattersApi.ts +86 -0
- package/lib/admin/pluginsApi.ts +339 -0
- package/lib/admin/retentionPolicyApi.ts +46 -0
- package/lib/admin/setupApi.ts +40 -0
- package/lib/admin/transportRulesApi.ts +106 -0
- package/lib/appearance/preferencesApi.ts +335 -0
- package/lib/auth/profileApi.ts +77 -0
- package/lib/auth/session.ts +238 -0
- package/lib/branding/brandingApi.ts +97 -0
- package/lib/branding/useBranding.ts +81 -0
- package/lib/calendar/calendarApi.ts +309 -0
- package/lib/calendar/calendarColors.ts +45 -0
- package/lib/calendar/calendarDragIds.ts +112 -0
- package/lib/calendar/calendarMutations.ts +236 -0
- package/lib/calendar/eventDescription.ts +211 -0
- package/lib/calendar/freeBusyApi.ts +197 -0
- package/lib/calendar/inviteApi.ts +154 -0
- package/lib/calendar/recurrence.ts +285 -0
- package/lib/components/avatar/ContactAvatar.tsx +47 -0
- package/lib/components/buttons/Button.tsx +40 -0
- package/lib/components/buttons/CopyButton.tsx +45 -0
- package/lib/components/feedback/Alert.tsx +13 -0
- package/lib/components/feedback/Skeleton.tsx +38 -0
- package/lib/components/forms/FormField.tsx +23 -0
- package/lib/components/navigation/BottomTabBar.tsx +66 -0
- package/lib/components/overlays/Drawer.tsx +72 -0
- package/lib/components/overlays/Modal.tsx +64 -0
- package/lib/components/overlays/PopoverPortal.tsx +74 -0
- package/lib/components/overlays/overlayStack.ts +165 -0
- package/lib/components/pickers/MiniDatePicker.tsx +90 -0
- package/lib/contacts/contactsApi.ts +289 -0
- package/lib/contacts/vcard.ts +197 -0
- package/lib/crypto/composeSecurity.ts +140 -0
- package/lib/crypto/encoding.ts +36 -0
- package/lib/crypto/escrowKeys.ts +74 -0
- package/lib/crypto/idleTimeout.ts +49 -0
- package/lib/crypto/keySession.ts +483 -0
- package/lib/crypto/keys.ts +105 -0
- package/lib/crypto/keyvaultApi.ts +674 -0
- package/lib/crypto/masterKey.ts +134 -0
- package/lib/crypto/masterKeyWraps.ts +269 -0
- package/lib/crypto/messageSecurity.ts +600 -0
- package/lib/crypto/mime.ts +568 -0
- package/lib/crypto/passkeyUnlock.ts +103 -0
- package/lib/crypto/passwordUnlock.ts +98 -0
- package/lib/crypto/recoveryCode.ts +93 -0
- package/lib/crypto/signingProviderApi.ts +135 -0
- package/lib/crypto/smime.ts +459 -0
- package/lib/crypto/smimeMessage.ts +491 -0
- package/lib/crypto/useIdleKeyTimeout.ts +176 -0
- package/lib/crypto/verificationSeal.ts +288 -0
- package/lib/mail/compose/composeQuoting.ts +243 -0
- package/lib/mail/compose/emojiData.ts +34 -0
- package/lib/mail/compose/giphyApi.ts +31 -0
- package/lib/mail/conversationsApi.ts +123 -0
- package/lib/mail/dataExportApi.ts +73 -0
- package/lib/mail/directoryApi.ts +161 -0
- package/lib/mail/erasureRequestApi.ts +71 -0
- package/lib/mail/flaggedMessages.ts +80 -0
- package/lib/mail/focusedInboxOverridesApi.ts +64 -0
- package/lib/mail/labelsApi.ts +71 -0
- package/lib/mail/mailAddress.ts +76 -0
- package/lib/mail/mailApi.ts +1286 -0
- package/lib/mail/mailDetailHooks.ts +57 -0
- package/lib/mail/mailFilterRulesApi.ts +116 -0
- package/lib/mail/mailSignaturesApi.ts +84 -0
- package/lib/mail/mailboxAccessApi.ts +106 -0
- package/lib/mail/mailboxImportApi.ts +87 -0
- package/lib/mail/messageBodySanitizer.ts +129 -0
- package/lib/mail/pushClient.ts +375 -0
- package/lib/mail/sendEvents.ts +72 -0
- package/lib/mail/sendFailure.ts +98 -0
- package/lib/mail/senderListsApi.ts +161 -0
- package/lib/search/queryGrammar.ts +179 -0
- package/lib/search/searchApi.ts +199 -0
- package/lib/search/searchScoring.ts +46 -0
- package/lib/search/searchTier3.ts +406 -0
- package/lib/tasks/tasksApi.ts +128 -0
- package/lib/util/api.ts +318 -0
- package/lib/util/apiClientContext.ts +35 -0
- package/lib/util/apiQuery.ts +61 -0
- package/lib/util/clipboard.ts +55 -0
- package/lib/util/dateInput.ts +15 -0
- package/lib/util/timeZone.ts +33 -0
- package/lib/util/useCopyToClipboard.ts +48 -0
- package/lib/util/useIsMobile.ts +34 -0
- package/lib/videoconf/videoMeetingsApi.ts +144 -0
- package/package.json +10 -4
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed wrappers over `@rapidmx/restapi`'s REST surface. Shared by `apps/admin` and (from Phase 3 on)
|
|
3
|
+
* `apps/www` — there is no separate admin-only endpoint set to isolate: every route here is gated entirely
|
|
4
|
+
* by the ACL system, so the exact same call returns the caller's own data and what is shared with them - an
|
|
5
|
+
* administrator's included: no role reads another user's mail. The one exception is the administration scope
|
|
6
|
+
* (`scope: "admin"` -> `?scope=admin`), which ONLY the admin console passes: mailboxes then come back as
|
|
7
|
+
* administrative metadata (no keys, settings or content) and every call is audited; an administrator who needs
|
|
8
|
+
* to see somebody's mail impersonates them (`impersonateUser()`). See `BaseMailboxRoute`'s doc comment in
|
|
9
|
+
* `@rapidmx/restapi` and this repo's `.claude/NOTES.md`.
|
|
10
|
+
*/
|
|
11
|
+
import { ApiClient, ApiRequestError } from "../util/api.js";
|
|
12
|
+
import { ListParams } from "../util/apiQuery.js";
|
|
13
|
+
import type { EncryptionPreference, PublicKey } from "../crypto/keyvaultApi.js";
|
|
14
|
+
import type { ResolvedPrincipal } from "./mailboxAccessApi.js";
|
|
15
|
+
export type { ListParams };
|
|
16
|
+
export type { EncryptionPreference, PublicKey };
|
|
17
|
+
export type { ResolvedPrincipal };
|
|
18
|
+
/** Whether `mailbox` is one shared with the caller rather than their own: a delegate grant on somebody's mailbox, or a mailbox with no
|
|
19
|
+
* owner at all (a shared/org mailbox they were granted). */
|
|
20
|
+
export declare function isSharedWithMe(mailbox: Pick<Mailbox, "accessRole" | "ownerUserUid">): boolean;
|
|
21
|
+
/** `?scope=admin`: the administration scope, for the admin console only (trusted + elevated callers; audited). A mailbox
|
|
22
|
+
* then carries administrative metadata only - see `Mailbox.shared`. */
|
|
23
|
+
export interface AdminScopeParams {
|
|
24
|
+
scope?: "admin";
|
|
25
|
+
}
|
|
26
|
+
/** Who may see a mailbox's free/busy times (`POST /calendar-events/free-busy`): `"domain"` - anyone signed in who owns a mailbox in the same domain (the default);
|
|
27
|
+
* `"shared"` - only people who already hold access to the mailbox or its calendars; `"nobody"` - only the owner and delegates with full access;
|
|
28
|
+
* `"everyone"` - anyone signed in to this server. */
|
|
29
|
+
export type FreeBusyVisibility = "domain" | "shared" | "nobody" | "everyone";
|
|
30
|
+
/** The free/busy visibility `mailbox` has: `"domain"` when it says none (a mailbox stored before the setting existed). */
|
|
31
|
+
export declare function freeBusyVisibilityOf(mailbox: Pick<Mailbox, "freeBusyVisibility">): FreeBusyVisibility;
|
|
32
|
+
export interface Mailbox {
|
|
33
|
+
uid: string;
|
|
34
|
+
version: number;
|
|
35
|
+
dateCreated: string;
|
|
36
|
+
dateModified: string;
|
|
37
|
+
/** Absent for a true ownerless shared mailbox (e.g. `support@example.com`) — access is ACL-only. */
|
|
38
|
+
ownerUserUid?: string;
|
|
39
|
+
primarySmtpAddress: string;
|
|
40
|
+
aliasAddresses: string[];
|
|
41
|
+
displayName: string;
|
|
42
|
+
timezone: string;
|
|
43
|
+
quotaBytes: number;
|
|
44
|
+
usedBytes: number;
|
|
45
|
+
/** `true` for a bookable resource (Exchange's "room"/"equipment" mailbox concept) rather than a
|
|
46
|
+
* person — trusted-role-only to create, same gate as any other ownerless mailbox. */
|
|
47
|
+
isResource?: boolean;
|
|
48
|
+
/** Only meaningful when `isResource` is `true`. */
|
|
49
|
+
resourceType?: "room" | "equipment";
|
|
50
|
+
/** Informational only — not used by any accept/decline logic. */
|
|
51
|
+
resourceCapacity?: number;
|
|
52
|
+
/** Mirrors Exchange's `AutomateProcessing AutoAccept` — off by default. Has no effect unless
|
|
53
|
+
* `isResource` is also `true`. */
|
|
54
|
+
autoAcceptBookings?: boolean;
|
|
55
|
+
/** When set, every request is auto-accepted regardless of existing bookings. */
|
|
56
|
+
allowConflicts?: boolean;
|
|
57
|
+
/** A request starting further out than this many days is auto-declined. `undefined` means no limit. */
|
|
58
|
+
bookingWindowDays?: number;
|
|
59
|
+
/** A request longer than this many minutes is auto-declined. `undefined` means no limit. */
|
|
60
|
+
maxDurationMinutes?: number;
|
|
61
|
+
/** `true` if this mailbox's out-of-office auto-reply is currently enabled. Always present on a real
|
|
62
|
+
* `Mailbox` (defaults to `false` server-side) — optional here only because some older test fixtures
|
|
63
|
+
* predate this field, matching this file's existing convention for every other boolean flag above. */
|
|
64
|
+
oofEnabled?: boolean;
|
|
65
|
+
/** The out-of-office auto-reply message body — a single combined message rather than per-audience
|
|
66
|
+
* variants, matching `@rapidmx/restapi`'s own deliberate simplification. Always present (defaults to
|
|
67
|
+
* `""`), same caveat as `oofEnabled` above. */
|
|
68
|
+
oofMessage?: string;
|
|
69
|
+
/** When set together with `oofEndTime`, the auto-reply is only active within this window rather than
|
|
70
|
+
* indefinitely while `oofEnabled` is `true`. */
|
|
71
|
+
oofStartTime?: string;
|
|
72
|
+
oofEndTime?: string;
|
|
73
|
+
/** Whether `send()` attaches a real RFC 3798 receipt request to every outgoing message by default, for
|
|
74
|
+
* internal vs. external recipients respectively — a per-draft `Message.requestReceipt` (see
|
|
75
|
+
* `setMessageRequestReceipt()`) always overrides both at once when explicitly set. Always present on a
|
|
76
|
+
* real `Mailbox` (defaults `true`/`false` server-side respectively), same optional-for-old-fixtures
|
|
77
|
+
* caveat as `oofEnabled`. */
|
|
78
|
+
alwaysRequestReceiptInternal?: boolean;
|
|
79
|
+
/** Same as `alwaysRequestReceiptInternal`/`External`, for a recipient in a *different* organisation
|
|
80
|
+
* that has opted into federation with this one - a third tier between same-org and fully external. */
|
|
81
|
+
alwaysRequestReceiptFederated?: boolean;
|
|
82
|
+
alwaysRequestReceiptExternal?: boolean;
|
|
83
|
+
/** Whether this mailbox, as the *recipient* of a receipt request, sends one back immediately versus
|
|
84
|
+
* holding it for the owner's explicit approval (`approveReceipt()`/`declineReceipt()`) — classifies the
|
|
85
|
+
* requester, not the recipient. Always present (defaults `true`/`false` respectively), same caveat. */
|
|
86
|
+
autoSendReceiptsInternal?: boolean;
|
|
87
|
+
/** The federated-tier counterpart of `autoSendReceiptsInternal`/`External`. */
|
|
88
|
+
autoSendReceiptsFederated?: boolean;
|
|
89
|
+
autoSendReceiptsExternal?: boolean;
|
|
90
|
+
/** This mailbox's own encryption preference, per `specs/end-to-end_encryption.md` — a client
|
|
91
|
+
* defaults to encrypting only when *both* sender and recipient report `"mutual"`. Absent is
|
|
92
|
+
* equivalent to `{ preferEncrypt: "nopreference" }` (no keys enrolled yet). */
|
|
93
|
+
encryptPreference?: EncryptionPreference;
|
|
94
|
+
/** This mailbox's published public keys (signing and/or encryption) — safe to expose publicly,
|
|
95
|
+
* per the spec's own `PublicKey` doc comment. Absent/empty means no keys enrolled yet
|
|
96
|
+
* (`KeyEnrollmentGate` handles that state). */
|
|
97
|
+
keys?: PublicKey[];
|
|
98
|
+
/** How the caller reaches this mailbox: `"owner"` (theirs) or `"delegate"` (shared with them). Set by the plain list and read of
|
|
99
|
+
* mailboxes - not in an administration-scope answer - so a client can label the shared ones; see `isSharedWithMe()`. */
|
|
100
|
+
accessRole?: "owner" | "delegate";
|
|
101
|
+
/** Only in an administration-scope answer (`scope: "admin"`): the mailbox has no single owner. Such an answer
|
|
102
|
+
* carries administrative metadata only, so the fields it leaves out (`oofMessage`, `keys`, ...) are `undefined`. */
|
|
103
|
+
shared?: boolean;
|
|
104
|
+
/** The `EscrowScope` this mailbox is currently assigned to, if any — an admin-only assignment
|
|
105
|
+
* (`specs/end-to-end_encryption.md`'s Escrow Scoping). Assigning this alone does **not** create any
|
|
106
|
+
* `MasterKeyWrap` — the mailbox owner must separately wrap MK against the scope's public key (see
|
|
107
|
+
* `crypto/keyvaultApi.ts`'s `getEscrowInfo()` and `crypto/masterKeyWraps.ts`'s `buildEscrowWrap()`).
|
|
108
|
+
* Absent means this mailbox has no escrow scope assigned. */
|
|
109
|
+
escrowScopeId?: string;
|
|
110
|
+
/** Who may see when this mailbox is busy - see `FreeBusyVisibility`. Absent on a mailbox from before the setting existed, which reads as `"domain"`
|
|
111
|
+
* (`freeBusyVisibilityOf()`). Only the owner (or a delegate with full access) may change it. */
|
|
112
|
+
freeBusyVisibility?: FreeBusyVisibility;
|
|
113
|
+
/** This mailbox's Blocked Senders list (Outlook's): lowercase addresses (`user@example.com`) and domains (`@example.com`, that exact domain
|
|
114
|
+
* and not its subdomains), at most 1,000 of them, never also on `safeSenders`. Mail from one goes to Junk Email. Absent on a mailbox from
|
|
115
|
+
* before the list existed, or from a server without it - read it with `blockedSendersOf()`. Change it with `addBlockedSender()` and
|
|
116
|
+
* `removeBlockedSender()` (full access to the mailbox), not by writing the whole array. */
|
|
117
|
+
blockedSenders?: string[];
|
|
118
|
+
/** This mailbox's Safe Senders list, the same shape as `blockedSenders`. Authenticated mail from one is not sent to Junk Email for the spam
|
|
119
|
+
* filter's verdict. Read it with `safeSendersOf()`; change it with `addSafeSender()` and `removeSafeSender()`. */
|
|
120
|
+
safeSenders?: string[];
|
|
121
|
+
}
|
|
122
|
+
/** The blocked senders `mailbox` has: none when it says none (a mailbox stored before the list existed, or `null` from an SQL row). */
|
|
123
|
+
export declare function blockedSendersOf(mailbox: Pick<Mailbox, "blockedSenders">): string[];
|
|
124
|
+
/** The safe senders `mailbox` has: none when it says none. */
|
|
125
|
+
export declare function safeSendersOf(mailbox: Pick<Mailbox, "safeSenders">): string[];
|
|
126
|
+
/** Lists the mailboxes the caller owns or has been granted - the same for everyone, an administrator included. With
|
|
127
|
+
* `scope: "admin"` (admin console only) it lists every mailbox as administrative metadata instead. */
|
|
128
|
+
export declare function listMailboxes(params?: ListParams & AdminScopeParams, client?: ApiClient): Promise<Mailbox[]>;
|
|
129
|
+
/** One mailbox the caller owns or has been granted; with `scope: "admin"` (admin console only), its administrative metadata. */
|
|
130
|
+
export declare function getMailbox(uid: string, options?: AdminScopeParams, client?: ApiClient): Promise<Mailbox>;
|
|
131
|
+
/** Lists bookable resource mailboxes (rooms/equipment) visible to the caller — same ACL scoping as
|
|
132
|
+
* `listMailboxes()`, just pre-filtered server-side to `isResource: true` so `ResourcePicker` doesn't
|
|
133
|
+
* need to fetch and filter the caller's entire mailbox list client-side. */
|
|
134
|
+
export declare function listResourceMailboxes(params?: ListParams, client?: ApiClient): Promise<Mailbox[]>;
|
|
135
|
+
export interface CreateMailboxInput {
|
|
136
|
+
/** Omit entirely to create a true ownerless shared mailbox — trusted-role-only (see BaseMailboxRoute). */
|
|
137
|
+
ownerUserUid?: string;
|
|
138
|
+
primarySmtpAddress: string;
|
|
139
|
+
aliasAddresses?: string[];
|
|
140
|
+
displayName: string;
|
|
141
|
+
timezone: string;
|
|
142
|
+
quotaBytes: number;
|
|
143
|
+
isResource?: boolean;
|
|
144
|
+
resourceType?: "room" | "equipment";
|
|
145
|
+
resourceCapacity?: number;
|
|
146
|
+
autoAcceptBookings?: boolean;
|
|
147
|
+
allowConflicts?: boolean;
|
|
148
|
+
bookingWindowDays?: number;
|
|
149
|
+
maxDurationMinutes?: number;
|
|
150
|
+
}
|
|
151
|
+
export declare function createMailbox(input: CreateMailboxInput, client?: ApiClient): Promise<Mailbox>;
|
|
152
|
+
/**
|
|
153
|
+
* Who a typed principal - a mailbox address, an auth-server username or e-mail alias, or a user uid - is, for an
|
|
154
|
+
* administrator naming a mailbox's owner (a new mailbox here, or a future reassignment) to confirm before saving.
|
|
155
|
+
* Rejects with a 404 `ApiRequestError` ("No user found for ...") for nobody. Trusted-role-only
|
|
156
|
+
* (`BaseMailboxRoute.resolveOwner()` in `@rapidmx/restapi`) - the same exact-match resolution
|
|
157
|
+
* `resolveMailboxPrincipal()` (`mailboxAccessApi.ts`) uses for sharing.
|
|
158
|
+
*/
|
|
159
|
+
export declare function resolveMailboxOwner(principal: string, client?: ApiClient): Promise<ResolvedPrincipal>;
|
|
160
|
+
/** This server's configured domain list (`mail:domains`) — empty when unconfigured, meaning no
|
|
161
|
+
* restriction applies and a `primarySmtpAddress` may be on any domain. */
|
|
162
|
+
export declare function listMailboxDomains(client?: ApiClient): Promise<string[]>;
|
|
163
|
+
/** One (name alias, domain) combination the caller could register as their mailbox address. */
|
|
164
|
+
export interface MailboxAutoProvisionAliasOption {
|
|
165
|
+
alias: string;
|
|
166
|
+
domain: string;
|
|
167
|
+
primarySmtpAddress: string;
|
|
168
|
+
}
|
|
169
|
+
export type MailboxAutoProvisionResult = {
|
|
170
|
+
status: "created";
|
|
171
|
+
mailbox: Mailbox;
|
|
172
|
+
} | {
|
|
173
|
+
status: "existing";
|
|
174
|
+
mailbox: Mailbox;
|
|
175
|
+
} | {
|
|
176
|
+
status: "needs_selection";
|
|
177
|
+
options: MailboxAutoProvisionAliasOption[];
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Self-service mailbox creation for a user with none yet — see `BaseMailboxRoute.autoProvision()`'s own
|
|
181
|
+
* doc comment in `@rapidmx/restapi` for the full contract. Call with no `selection` first; if the
|
|
182
|
+
* result is `needs_selection`, call again with the option the user picked from that list.
|
|
183
|
+
*/
|
|
184
|
+
export declare function autoProvisionMailbox(selection?: {
|
|
185
|
+
alias: string;
|
|
186
|
+
domain: string;
|
|
187
|
+
}, client?: ApiClient): Promise<MailboxAutoProvisionResult>;
|
|
188
|
+
/**
|
|
189
|
+
* A partial mailbox update. The fields typed `| null` are the ones `@rapidmx/restapi`'s `Mailbox` model
|
|
190
|
+
* copies whenever the key is *present* in the body (not only when it's non-`undefined`), so sending
|
|
191
|
+
* `null` clears them - `JSON.stringify()` drops an `undefined` value entirely, which would instead leave
|
|
192
|
+
* the old value in place.
|
|
193
|
+
*/
|
|
194
|
+
export interface UpdateMailboxInput {
|
|
195
|
+
uid: string;
|
|
196
|
+
version: number;
|
|
197
|
+
displayName?: string;
|
|
198
|
+
timezone?: string;
|
|
199
|
+
quotaBytes?: number;
|
|
200
|
+
aliasAddresses?: string[];
|
|
201
|
+
isResource?: boolean;
|
|
202
|
+
resourceType?: "room" | "equipment" | null;
|
|
203
|
+
resourceCapacity?: number | null;
|
|
204
|
+
autoAcceptBookings?: boolean;
|
|
205
|
+
allowConflicts?: boolean;
|
|
206
|
+
bookingWindowDays?: number | null;
|
|
207
|
+
maxDurationMinutes?: number | null;
|
|
208
|
+
oofEnabled?: boolean;
|
|
209
|
+
oofMessage?: string;
|
|
210
|
+
oofStartTime?: string | null;
|
|
211
|
+
oofEndTime?: string | null;
|
|
212
|
+
alwaysRequestReceiptInternal?: boolean;
|
|
213
|
+
alwaysRequestReceiptFederated?: boolean;
|
|
214
|
+
alwaysRequestReceiptExternal?: boolean;
|
|
215
|
+
autoSendReceiptsInternal?: boolean;
|
|
216
|
+
autoSendReceiptsFederated?: boolean;
|
|
217
|
+
autoSendReceiptsExternal?: boolean;
|
|
218
|
+
/** Trusted-caller-only server-side. `null` (or `""`) unassigns the mailbox's escrow scope; the
|
|
219
|
+
* referenced `EscrowScope` must exist otherwise. See `Mailbox.escrowScopeId`. */
|
|
220
|
+
escrowScopeId?: string | null;
|
|
221
|
+
/** The owner's own record only (403 for anyone without full access to the mailbox; 400 for a value that is not one of the four). */
|
|
222
|
+
freeBusyVisibility?: FreeBusyVisibility;
|
|
223
|
+
}
|
|
224
|
+
export declare function updateMailbox(input: UpdateMailboxInput, client?: ApiClient): Promise<Mailbox>;
|
|
225
|
+
/**
|
|
226
|
+
* Deletes a mailbox. Only the mailbox itself goes: its folders and everything in them stay - and the address can't be used for a
|
|
227
|
+
* new mailbox - until that data is erased. `erase: true` (administrators only; anybody else is refused 403 before anything is
|
|
228
|
+
* deleted) also files that erasure in the same step, which the server then runs in the background; without it the data is left for
|
|
229
|
+
* `admin/leftoverMailboxApi.ts` to list and erase later.
|
|
230
|
+
*/
|
|
231
|
+
export declare function deleteMailbox(uid: string, version: number, options?: {
|
|
232
|
+
erase?: boolean;
|
|
233
|
+
}, client?: ApiClient): Promise<void>;
|
|
234
|
+
export type QuarantineReason = "infected" | "spam_policy" | "transport_rule" | "other";
|
|
235
|
+
export interface QuarantineEntry {
|
|
236
|
+
uid: string;
|
|
237
|
+
version: number;
|
|
238
|
+
dateCreated: string;
|
|
239
|
+
dateModified: string;
|
|
240
|
+
mailboxUid: string;
|
|
241
|
+
originalMessageUid?: string;
|
|
242
|
+
reason: QuarantineReason;
|
|
243
|
+
scanResultUid: string;
|
|
244
|
+
rawBlobKey: string;
|
|
245
|
+
releasedAt?: string;
|
|
246
|
+
releasedByUserUid?: string;
|
|
247
|
+
}
|
|
248
|
+
/** Lists quarantined mail for a mailbox the caller owns or has been granted; with `scope: "admin"` (admin console only), for any mailbox. */
|
|
249
|
+
export declare function listQuarantine(mailboxUid: string, params?: ListParams & AdminScopeParams, client?: ApiClient): Promise<QuarantineEntry[]>;
|
|
250
|
+
/**
|
|
251
|
+
* Marks a quarantined entry released. This only updates the record's metadata — it does not re-inject the
|
|
252
|
+
* message into normal delivery (see `@rapidmx/restapi`'s NOTES.md for why that's an explicit non-goal here).
|
|
253
|
+
*/
|
|
254
|
+
export declare function releaseQuarantineEntry(uid: string, version: number, releasedByUserUid: string, client?: ApiClient): Promise<QuarantineEntry>;
|
|
255
|
+
export type IngestStatus = "pending" | "scanning" | "delivered" | "failed";
|
|
256
|
+
export interface IngestQueueEntry {
|
|
257
|
+
uid: string;
|
|
258
|
+
version: number;
|
|
259
|
+
dateCreated: string;
|
|
260
|
+
dateModified: string;
|
|
261
|
+
mailboxUid: string;
|
|
262
|
+
envelopeFrom: string;
|
|
263
|
+
envelopeTo: string[];
|
|
264
|
+
rawBlobKey: string;
|
|
265
|
+
status: IngestStatus;
|
|
266
|
+
errorMessage?: string;
|
|
267
|
+
/** How many times scanning has failed for this entry; unset until the first failure. */
|
|
268
|
+
attempts?: number;
|
|
269
|
+
/** ISO 8601 - when a `failed` entry becomes eligible for its next retry; unset once retries are exhausted. */
|
|
270
|
+
nextAttemptAt?: string;
|
|
271
|
+
/** ISO 8601 - while `scanning`, when the claiming worker's lease expires (after which the entry can be
|
|
272
|
+
* claimed again). */
|
|
273
|
+
scanLeaseExpiresAt?: string;
|
|
274
|
+
}
|
|
275
|
+
/** Lists ingest-queue entries for a mailbox the caller owns or has been granted - useful for diagnosing stuck delivery; with
|
|
276
|
+
* `scope: "admin"` (admin console only), for any mailbox. */
|
|
277
|
+
export declare function listIngestQueue(mailboxUid: string, params?: ListParams & AdminScopeParams, client?: ApiClient): Promise<IngestQueueEntry[]>;
|
|
278
|
+
export interface AclRecord {
|
|
279
|
+
userOrRoleId: string;
|
|
280
|
+
actions: string[];
|
|
281
|
+
}
|
|
282
|
+
export interface AccessControlList {
|
|
283
|
+
uid: string;
|
|
284
|
+
version: number;
|
|
285
|
+
parentUid?: string;
|
|
286
|
+
records: AclRecord[];
|
|
287
|
+
}
|
|
288
|
+
/** Fetches a mailbox's own ACL — its `records` are its owner's/delegates' grants (see BaseACLRoute). The server only answers a
|
|
289
|
+
* caller who holds full access to that mailbox as themselves (never through a trusted role): to list, grant or revoke a mailbox's
|
|
290
|
+
* members use `listMailboxAccess()`/`setMailboxAccess()`/`removeMailboxAccess()` (`mailboxAccessApi.ts`), which is also the
|
|
291
|
+
* audited way an administrator shares an ownerless mailbox. */
|
|
292
|
+
export declare function getMailboxAcl(mailboxUid: string, client?: ApiClient): Promise<AccessControlList>;
|
|
293
|
+
/**
|
|
294
|
+
* Grants (or replaces, if `userOrRoleId` already has a record) a delegate's access to a mailbox — the
|
|
295
|
+
* mechanism behind Exchange-style shared mailboxes. Read-modify-write against the ACL's own optimistic
|
|
296
|
+
* `version`, so concurrent grants can conflict; the caller should retry on a 409/version-mismatch.
|
|
297
|
+
*/
|
|
298
|
+
export declare function grantMailboxAccess(mailboxUid: string, userOrRoleId: string, actions: string[], client?: ApiClient): Promise<AccessControlList>;
|
|
299
|
+
/** Revokes a delegate's access to a mailbox previously granted via `grantMailboxAccess`. */
|
|
300
|
+
export declare function revokeMailboxAccess(mailboxUid: string, userOrRoleId: string, client?: ApiClient): Promise<AccessControlList>;
|
|
301
|
+
export type FolderType = "inbox" | "sent_items" | "drafts" | "deleted_items" | "outbox" | "junk" | "archive" | "calendar" | "contacts" | "tasks" | "notes" | "user";
|
|
302
|
+
export interface Folder {
|
|
303
|
+
uid: string;
|
|
304
|
+
version: number;
|
|
305
|
+
dateCreated: string;
|
|
306
|
+
dateModified: string;
|
|
307
|
+
mailboxUid: string;
|
|
308
|
+
name: string;
|
|
309
|
+
type: FolderType;
|
|
310
|
+
parentFolderUid?: string;
|
|
311
|
+
unreadCount: number;
|
|
312
|
+
totalCount: number;
|
|
313
|
+
/** Display color for a `calendar`-type folder (a hex string or palette key) — unused by every other
|
|
314
|
+
* folder type. Absent on a mailbox's original auto-provisioned calendar; see `calendarColors.ts`'s
|
|
315
|
+
* `colorForFolder` for the fallback every caller should use instead of reading this field directly. */
|
|
316
|
+
color?: string;
|
|
317
|
+
}
|
|
318
|
+
/** Lists a mailbox's folders — visible to its owner, any delegate the mailbox is shared with, or (trusted) anyone. */
|
|
319
|
+
export declare function listFolders(mailboxUid: string, client?: ApiClient): Promise<Folder[]>;
|
|
320
|
+
export interface CreateFolderInput {
|
|
321
|
+
mailboxUid: string;
|
|
322
|
+
name: string;
|
|
323
|
+
type: FolderType;
|
|
324
|
+
parentFolderUid?: string;
|
|
325
|
+
color?: string;
|
|
326
|
+
}
|
|
327
|
+
/** Creates a new folder — e.g. an additional `calendar`-type folder for multi-calendar support. Nothing
|
|
328
|
+
* about folder creation is type-restricted server-side (see the Phase 4 plan's own note on
|
|
329
|
+
* `BaseFolderRoute.create()`), so this is just a thin wrapper, not a new backend capability. */
|
|
330
|
+
export declare function createFolder(input: CreateFolderInput, client?: ApiClient): Promise<Folder>;
|
|
331
|
+
export interface UpdateFolderInput {
|
|
332
|
+
uid: string;
|
|
333
|
+
version: number;
|
|
334
|
+
name?: string;
|
|
335
|
+
color?: string;
|
|
336
|
+
}
|
|
337
|
+
export declare function updateFolder(input: UpdateFolderInput, client?: ApiClient): Promise<Folder>;
|
|
338
|
+
export type RecipientType = "to" | "cc" | "bcc";
|
|
339
|
+
export interface Recipient {
|
|
340
|
+
address: string;
|
|
341
|
+
displayName?: string;
|
|
342
|
+
type: RecipientType;
|
|
343
|
+
}
|
|
344
|
+
export interface MessageFlags {
|
|
345
|
+
read: boolean;
|
|
346
|
+
flagged: boolean;
|
|
347
|
+
answered: boolean;
|
|
348
|
+
forwarded: boolean;
|
|
349
|
+
}
|
|
350
|
+
export type MessageImportance = "low" | "normal" | "high";
|
|
351
|
+
/** Mirrors `@rapidmx/restapi`'s `MessageClassification` enum values exactly (`classify()`'s `classifyAs`
|
|
352
|
+
* body field only accepts these two literal strings). */
|
|
353
|
+
export type MessageClassification = "focused" | "other";
|
|
354
|
+
export interface Message {
|
|
355
|
+
uid: string;
|
|
356
|
+
version: number;
|
|
357
|
+
dateCreated: string;
|
|
358
|
+
dateModified: string;
|
|
359
|
+
folderUid: string;
|
|
360
|
+
mailboxUid: string;
|
|
361
|
+
messageId: string;
|
|
362
|
+
subject: string;
|
|
363
|
+
from: Recipient;
|
|
364
|
+
recipients: Recipient[];
|
|
365
|
+
sentDate: string;
|
|
366
|
+
receivedDate: string;
|
|
367
|
+
bodyPreview: string;
|
|
368
|
+
flags: MessageFlags;
|
|
369
|
+
/** Server-managed mirror of `flags.read`, which exists only so the *server* can filter and sort on it
|
|
370
|
+
* (`flags` is one JSON column, so nothing can index into it). Read `flags.read`, not this: it is never
|
|
371
|
+
* accepted in a request body, and a message stored before these fields existed carries none of them. */
|
|
372
|
+
read?: boolean;
|
|
373
|
+
/** Server-managed mirror of `flags.flagged` — see `read`. */
|
|
374
|
+
flagged?: boolean;
|
|
375
|
+
/** Server-managed mirror of `from.address`, lowercased and trimmed — see `read`. */
|
|
376
|
+
fromAddress?: string;
|
|
377
|
+
importance: MessageImportance;
|
|
378
|
+
/** Server-managed sortable rank of `importance` (low 0, normal 1, high 2) — see `read`. */
|
|
379
|
+
importanceRank?: number;
|
|
380
|
+
hasAttachments: boolean;
|
|
381
|
+
/** Set once `recallMessage()` has been called on this message — a recall is asynchronous and
|
|
382
|
+
* best-effort (see that function's own doc comment), so this is the only signal a caller gets;
|
|
383
|
+
* there is no separate "recalled successfully"/"failed" outcome synced onto the record itself. */
|
|
384
|
+
recallRequestedAt?: string;
|
|
385
|
+
/** Set by `sendMessage()` with a future `scheduledSendTime` option, which defers relay until then instead of
|
|
386
|
+
* sending immediately — mirrors Outlook's "Do not deliver before". The message sits in the mailbox's
|
|
387
|
+
* `outbox` folder (lazily created on the first scheduled send — never eagerly provisioned the way
|
|
388
|
+
* Drafts/Sent Items are) until `@rapidmx/restapi`'s own `ScheduledSendJob` relays it and clears
|
|
389
|
+
* this field. */
|
|
390
|
+
scheduledSendTime?: string;
|
|
391
|
+
/** Consecutive failed `ScheduledSendJob` attempts for the current scheduled send - each failure pushes
|
|
392
|
+
* `scheduledSendTime` forward; cleared on success and when the job gives up. */
|
|
393
|
+
scheduledSendAttempts?: number;
|
|
394
|
+
/** Why `ScheduledSendJob` gave up on (or refused) this scheduled send. Set together with clearing
|
|
395
|
+
* `scheduledSendTime`, so the message stays in Outbox unsent - show it so the user can fix and resend.
|
|
396
|
+
* Cleared on a successful send. */
|
|
397
|
+
scheduledSendError?: string;
|
|
398
|
+
/** Set once the transport accepted this message; cleared when it is filed into Sent Items. */
|
|
399
|
+
scheduledSendRelayedAt?: string;
|
|
400
|
+
/** The in-flight marker of a send (the claim's lease expiry). While it lies in the future the message can't be
|
|
401
|
+
* moved out of Outbox. */
|
|
402
|
+
scheduledSendLeaseExpiresAt?: string;
|
|
403
|
+
/** Absent means Focused — see `classifyMessage()` and `@rapidmx/restapi`'s own
|
|
404
|
+
* `FocusedInboxUtils.classifyMessage()` doc comment for the full precedence rule this reflects. */
|
|
405
|
+
inferenceClassification?: MessageClassification;
|
|
406
|
+
/** Set on a draft before `sendMessage()` to request a receipt, overriding the mailbox's own
|
|
407
|
+
* `alwaysRequestReceiptInternal`/`External` defaults — see `setMessageRequestReceipt()`. Meaningless
|
|
408
|
+
* once the message has actually been sent. */
|
|
409
|
+
requestReceipt?: boolean;
|
|
410
|
+
/** `true` when a delivery/read receipt was requested but this (recipient) mailbox's
|
|
411
|
+
* `autoSendReceiptsInternal`/`External` setting held it for the owner's explicit approval instead of
|
|
412
|
+
* sending it immediately — see `approveReceipt()`/`declineReceipt()`. Always present on a real
|
|
413
|
+
* delivered `Message` (defaults `false`), same optional-for-old-fixtures caveat as `Mailbox.oofEnabled`. */
|
|
414
|
+
deliveryReceiptPending?: boolean;
|
|
415
|
+
readReceiptPending?: boolean;
|
|
416
|
+
/** The per-recipient delivery/read roster on a *sent* message — the client-visible tracking indicator.
|
|
417
|
+
* `undefined` (not an empty array) when no receipt was ever requested for this message. */
|
|
418
|
+
receiptStatus?: MessageReceiptEntry[];
|
|
419
|
+
/** `true` when this message's body is S/MIME (CMS) encrypted — computed server-side by
|
|
420
|
+
* `@rapidmx/restapi`'s `ScanPipeline` from the actual stored MIME structure, not something a
|
|
421
|
+
* client ever sets directly. Says nothing about whether it's *signed* — see
|
|
422
|
+
* `specs/end-to-end_encryption.md`'s Message Security Indicators (encryption and signing are
|
|
423
|
+
* separate guarantees); signature verification happens client-side by decrypting/parsing the
|
|
424
|
+
* stored body, not from a flag this API exposes. Always present on a real `Message` (defaults
|
|
425
|
+
* `false` server-side), same optional-for-old-fixtures caveat as `Mailbox.oofEnabled`. */
|
|
426
|
+
encrypted?: boolean;
|
|
427
|
+
/** The raw RFC 2369/8058 `List-Unsubscribe` header value, if present — computed server-side by
|
|
428
|
+
* `@rapidmx/restapi`'s `ScanPipeline` from the stored MIME, the strongest single bulk-mail signal it
|
|
429
|
+
* captures. Used client-side to detect list traffic when replying, per
|
|
430
|
+
* `specs/end-to-end_encryption.md`'s "Mailing lists" note under Digital Signatures: a list that
|
|
431
|
+
* appends a footer after signing invalidates the signature, so composing a reply to one SHOULD
|
|
432
|
+
* default signing off. `undefined` for ordinary mail — never computed or guessed client-side. */
|
|
433
|
+
listUnsubscribeHeader?: string;
|
|
434
|
+
/** `Label.uid`s applied to this message (Gmail-style labels, `labelsApi.ts`) - either set directly
|
|
435
|
+
* (`setMessageLabels()`) or auto-applied server-side by a `MailFilterActionType.APPLY_LABEL` rule.
|
|
436
|
+
* `undefined`/empty means no labels. */
|
|
437
|
+
labelUids?: string[];
|
|
438
|
+
/** An opaque client-written verification seal (at most 2048 characters of `[A-Za-z0-9+/=_.:-]`) recording that this
|
|
439
|
+
* message's signature verified when first opened - see `crypto/verificationSeal.ts` and
|
|
440
|
+
* `setMessageVerificationSeal()`. The server stores it as given, never interprets it, and never copies it to another
|
|
441
|
+
* message. Absent until a client writes one. */
|
|
442
|
+
verificationSeal?: string;
|
|
443
|
+
/** The vault `masterKeyGeneration` `verificationSeal` was written under, as sent to `setMessageVerificationSeal()`. */
|
|
444
|
+
verificationSealGeneration?: number;
|
|
445
|
+
/** What the reader reported this message as (`reportMessage()`); server-managed, never written by a client. Absent (or `null`) when never reported. */
|
|
446
|
+
reportedAs?: MessageReportKind | null;
|
|
447
|
+
/** When `reportedAs` was last set. */
|
|
448
|
+
dateReported?: string | null;
|
|
449
|
+
/** The `messageId` of the message this one replies to (RFC 5322 `In-Reply-To`, angle brackets stripped) -
|
|
450
|
+
* parsed from the MIME on a delivered message, and what a compose client passes to `createDraft()` when it
|
|
451
|
+
* opens a reply. Absent on a message that replies to nothing. */
|
|
452
|
+
inReplyTo?: string;
|
|
453
|
+
/** This message's thread, oldest first (RFC 5322 `References`, angle brackets stripped): the thread root's
|
|
454
|
+
* `messageId`, then each reply's down to the one this message replies to. Empty, or absent on a message
|
|
455
|
+
* stored before the field existed. See `buildReplyThreading()` in `compose/composeQuoting.ts`. */
|
|
456
|
+
references?: string[];
|
|
457
|
+
/** Server-assigned: the thread this message is grouped under in a conversation list (`conversationsApi.ts`).
|
|
458
|
+
* Derived at delivery/send time from `references`/`inReplyTo`, never accepted in a request body. */
|
|
459
|
+
conversationId?: string;
|
|
460
|
+
/** Server-managed: the iTIP `METHOD` of the calendar file this message carries - `"REQUEST"`, `"REPLY"`, `"CANCEL"`,
|
|
461
|
+
* `"PUBLISH"` or `"COUNTER"`, or `""` when the file names none - set on delivery for any message with a readable calendar file.
|
|
462
|
+
* Absent on a message with none. Lets a list mark meeting requests without opening every message. */
|
|
463
|
+
meetingMethod?: string;
|
|
464
|
+
/** Server-managed: what the reader answered a meeting request with (`respondToMessageInvite()`), when they have. */
|
|
465
|
+
meetingResponse?: "accepted" | "tentative" | "declined";
|
|
466
|
+
}
|
|
467
|
+
export interface MessageReceiptEntry {
|
|
468
|
+
recipientAddress: string;
|
|
469
|
+
deliveredAt?: string;
|
|
470
|
+
readAt?: string;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* The sort keys `listMessages()` accepts, mirroring `@rapidmx/restapi`'s own `MESSAGE_LIST_SORTS` exactly —
|
|
474
|
+
* anything else is refused with a 400. This is the whole set this data model can support: Outlook's sort menu
|
|
475
|
+
* also offers Category, Flag status due date, Size and Type, and a RapidMX `Message` has no field behind any of
|
|
476
|
+
* those (labels are multi-valued, so there is no single category to order by; there is no follow-up due date,
|
|
477
|
+
* no stored message size and no message class). "Flag status" is `flagged`.
|
|
478
|
+
*/
|
|
479
|
+
export type MessageListSort = "date" | "sentDate" | "from" | "subject" | "importance" | "flagged";
|
|
480
|
+
/**
|
|
481
|
+
* Outlook's "Newest on top" (`desc`) / "Oldest on top" (`asc`). Left off, the server picks the direction that
|
|
482
|
+
* reads naturally for the key — newest/highest/flagged first for `date`/`sentDate`/`importance`/`flagged`, A-Z
|
|
483
|
+
* for `from`/`subject`.
|
|
484
|
+
*/
|
|
485
|
+
export type MessageSortOrder = "asc" | "desc";
|
|
486
|
+
/**
|
|
487
|
+
* The named filters `listMessages()` accepts, mirroring `@rapidmx/restapi`'s own `MESSAGE_LIST_FILTERS`
|
|
488
|
+
* exactly. `focused`/`other` are the Focused Inbox split (only meaningful in the Inbox; `focused` includes a
|
|
489
|
+
* message carrying no classification at all, which is what absent means).
|
|
490
|
+
*
|
|
491
|
+
* Outlook's filter menu additionally offers "To me", "Mentions me" and "Has calendar invites"; none of the
|
|
492
|
+
* three is a server-side filter here, because nothing on a `Message` records them.
|
|
493
|
+
*/
|
|
494
|
+
export type MessageListFilter = "all" | "unread" | "read" | "flagged" | "hasAttachments" | "focused" | "other";
|
|
495
|
+
/**
|
|
496
|
+
* The most labels one list request may filter by, matching `@rapidmx/restapi`'s own
|
|
497
|
+
* `MAX_MESSAGE_LABEL_FILTER_UIDS` — a longer set is refused with a 400, so a label menu offering multiple
|
|
498
|
+
* selection should stop the user here rather than send it.
|
|
499
|
+
*/
|
|
500
|
+
export declare const MAX_MESSAGE_LABEL_FILTER = 20;
|
|
501
|
+
/** Paging plus the mail list's own sort/filter vocabulary. */
|
|
502
|
+
export interface MessageListParams extends ListParams {
|
|
503
|
+
sortBy?: MessageListSort;
|
|
504
|
+
sortOrder?: MessageSortOrder;
|
|
505
|
+
filter?: MessageListFilter;
|
|
506
|
+
/**
|
|
507
|
+
* `Label.uid`s to filter by (list the mailbox's labels with `listLabels()` in `labelsApi.ts`). A message is
|
|
508
|
+
* listed if it carries ANY of them, which is then ANDed with `filter` — so `{ filter: "unread", labelUids:
|
|
509
|
+
* [red, blue] }` is "unread, and labelled red or blue". Order is irrelevant and duplicates are ignored. An
|
|
510
|
+
* empty array is no filter at all, and a uid naming no label (or one belonging to another mailbox) matches
|
|
511
|
+
* nothing. At most `MAX_MESSAGE_LABEL_FILTER` of them, each a real uid — anything else is a 400.
|
|
512
|
+
*/
|
|
513
|
+
labelUids?: string[];
|
|
514
|
+
}
|
|
515
|
+
/** Only the sort/filter params actually set, so a default list sends the same URL it always did. */
|
|
516
|
+
export declare function messageListQuery(params: MessageListParams): Record<string, string>;
|
|
517
|
+
/**
|
|
518
|
+
* Lists messages in a folder — newest received first unless `sortBy`/`sortOrder` say otherwise, and unfiltered
|
|
519
|
+
* unless `filter`/`labelUids` say otherwise. All of them are applied by the *database*, over the whole folder
|
|
520
|
+
* rather than over the page this call happens to return, so `page`/`limit` stay correct under a filter and a
|
|
521
|
+
* sort. Ties are broken by `uid`, so a message never appears on two pages or on neither.
|
|
522
|
+
*/
|
|
523
|
+
export declare function listMessages(folderUid: string, params?: MessageListParams, client?: ApiClient): Promise<Message[]>;
|
|
524
|
+
export declare function getMessage(uid: string, client?: ApiClient): Promise<Message>;
|
|
525
|
+
/**
|
|
526
|
+
* Attempts to recall a message this mailbox previously sent — only valid for a message currently in
|
|
527
|
+
* Sent Items (enforced server-side). Asynchronous and best-effort: this composes and relays a control
|
|
528
|
+
* message to every original recipient, but the actual delete-if-still-unread mutation happens later on
|
|
529
|
+
* each recipient's own mail system — there is no synchronous "recalled" outcome to report back, and the
|
|
530
|
+
* only visible effect here is `recallRequestedAt` getting set on the response.
|
|
531
|
+
*/
|
|
532
|
+
export declare function recallMessage(uid: string, client?: ApiClient): Promise<Message>;
|
|
533
|
+
/**
|
|
534
|
+
* Moves a message into the mailbox's Archive folder (`FolderType.ARCHIVE`), lazily created on first use
|
|
535
|
+
* server-side — same pattern as Sent Items/Outbox, no client-side folder-creation step needed. Rejects
|
|
536
|
+
* (400, surfaced as an `ApiRequestError`) for a message currently in Drafts or Outbox. Idempotent —
|
|
537
|
+
* archiving an already-archived message is a no-op that still returns the message.
|
|
538
|
+
*/
|
|
539
|
+
export declare function archiveMessage(uid: string, client?: ApiClient): Promise<Message>;
|
|
540
|
+
/**
|
|
541
|
+
* Moves a message between the Focused and Other halves of the Inbox — Outlook's "Move to Other" gesture.
|
|
542
|
+
* With `applyToSender: true` ("Always move to Other"), also upserts a standing `FocusedInboxOverride` for
|
|
543
|
+
* every future message from the same sender (see `focusedInboxOverridesApi.ts`) in the same round trip.
|
|
544
|
+
*/
|
|
545
|
+
export declare function classifyMessage(uid: string, classifyAs: MessageClassification, applyToSender?: boolean, client?: ApiClient): Promise<Message>;
|
|
546
|
+
/**
|
|
547
|
+
* Marks a message read/unread in place. `folderUid` must be included even though it isn't changing — every
|
|
548
|
+
* `Message` update is scoped by its owning folder (see `BaseScopedChildRoute`), and this framework's `PUT`
|
|
549
|
+
* routes replace the whole record rather than patch individual fields.
|
|
550
|
+
*/
|
|
551
|
+
export declare function setMessageRead(message: Message, read: boolean, client?: ApiClient): Promise<Message>;
|
|
552
|
+
/** Flags/unflags a message in place — Outlook's flag-status toggle, and what `listMessages({ filter:
|
|
553
|
+
* "flagged" })` and `listFlaggedMessages()` select on. */
|
|
554
|
+
export declare function setMessageFlagged(message: Message, flagged: boolean, client?: ApiClient): Promise<Message>;
|
|
555
|
+
/** Moves a message into another folder of the same mailbox — how "Move to", "Archive" (to the Archive folder),
|
|
556
|
+
* "Report junk" (to Junk) and "Delete" (to Deleted Items) are all expressed. */
|
|
557
|
+
export declare function moveMessage(message: Message, folderUid: string, client?: ApiClient): Promise<Message>;
|
|
558
|
+
/** What a message can be reported as - see `reportMessage()`. */
|
|
559
|
+
export type MessageReportKind = "junk" | "phishing" | "not_junk";
|
|
560
|
+
/** Why the server did not teach its spam filter from a report: `encrypted` (it has no plaintext to teach), `disabled` (learning is switched off),
|
|
561
|
+
* `unsupported` (no spam engine, or one that cannot learn), `too_large` (over the size it reads) or `failed` (the engine could not be reached,
|
|
562
|
+
* refused, or the message could not be read). The report itself still happened. */
|
|
563
|
+
export type MessageLearnSkipped = "encrypted" | "disabled" | "unsupported" | "too_large" | "failed";
|
|
564
|
+
/** What `reportMessage()` answers. */
|
|
565
|
+
export interface MessageReportResult {
|
|
566
|
+
uid: string;
|
|
567
|
+
kind: MessageReportKind;
|
|
568
|
+
/** The message changed folder; `false` when it was already where the report sends it. */
|
|
569
|
+
moved: boolean;
|
|
570
|
+
/** The folder the message is in now: the mailbox's Junk Email (`junk`, `phishing`) or Inbox (`not_junk`). */
|
|
571
|
+
folderUid: string;
|
|
572
|
+
/** The spam filter was taught from the message. */
|
|
573
|
+
learned: boolean;
|
|
574
|
+
/** Why it was not, when `learned` is `false` (absent when it was). */
|
|
575
|
+
learnSkipped?: MessageLearnSkipped;
|
|
576
|
+
/** The address added to the mailbox's safe senders, for `alwaysTrustSender`; absent when none was asked or the message names no usable one. */
|
|
577
|
+
safeSender?: string;
|
|
578
|
+
}
|
|
579
|
+
/** What `reportMessage()` may also ask for. */
|
|
580
|
+
export interface ReportMessageOptions {
|
|
581
|
+
/** With `not_junk` only (else a 400): also add the message's From address to the mailbox's safe senders. Needs full access to the mailbox (403 otherwise,
|
|
582
|
+
* before anything is done). */
|
|
583
|
+
alwaysTrustSender?: boolean;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Reports a message as junk, phishing or not junk - `POST /mail/messages/:uid/report`. The SERVER moves it (`junk` and `phishing` to the mailbox's Junk Email,
|
|
587
|
+
* `not_junk` to its Inbox; a message already there is not moved), records what was reported, teaches its spam filter (never for an encrypted message) and
|
|
588
|
+
* writes an audit entry; a caller needs no folder uid and no `version`. Rejects with a 400 for a message in Drafts or Outbox, a 403 without the right to change
|
|
589
|
+
* the message (or, for `alwaysTrustSender`, without full access to the mailbox), a 404 for an unknown message - and also for a server that predates the route,
|
|
590
|
+
* where a caller falls back to `moveMessage()`.
|
|
591
|
+
*/
|
|
592
|
+
export declare function reportMessage(uid: string, kind: MessageReportKind, options?: ReportMessageOptions, client?: ApiClient): Promise<MessageReportResult>;
|
|
593
|
+
/**
|
|
594
|
+
* The most updates `bulkUpdateMessages()` puts in one request, matching `@rapidmx/restapi`'s own
|
|
595
|
+
* `MAX_BULK_UPDATE` — a longer list is refused with a 400, so the helper below chunks rather than sending it.
|
|
596
|
+
*/
|
|
597
|
+
export declare const MAX_BULK_MESSAGE_UPDATE = 100;
|
|
598
|
+
/** One element of a bulk update: `uid` and the caller's last-known `version` (the server rejects a stale one
|
|
599
|
+
* with a 409), plus whichever fields are changing. */
|
|
600
|
+
export interface MessageUpdate {
|
|
601
|
+
uid: string;
|
|
602
|
+
version: number;
|
|
603
|
+
[field: string]: unknown;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Applies `updates` through `PUT /mail/messages`, the bulk form of the single-message update — one request per
|
|
607
|
+
* `MAX_BULK_MESSAGE_UPDATE` updates instead of one per message, with every permission, folder and legal-hold
|
|
608
|
+
* check the single-message path makes.
|
|
609
|
+
*
|
|
610
|
+
* Deliberately NOT atomic, on either side of the wire: the server applies each element in order and the first
|
|
611
|
+
* failure (a stale `version`, a refused move) aborts the rest of *that* request, leaving the elements before it
|
|
612
|
+
* applied; this helper then stops and rejects rather than sending the remaining chunks. So a caller should
|
|
613
|
+
* refetch the list after a rejection instead of assuming nothing happened, and should send fresh `version`s -
|
|
614
|
+
* a bulk action over a stale selection is the common way to hit a 409. For a per-element outcome, call the
|
|
615
|
+
* single-message functions instead.
|
|
616
|
+
*
|
|
617
|
+
* Resolves with every message actually updated, in request order.
|
|
618
|
+
*/
|
|
619
|
+
export declare function bulkUpdateMessages(updates: MessageUpdate[], client?: ApiClient): Promise<Message[]>;
|
|
620
|
+
/** Marks a whole selection read/unread in one pass — see `bulkUpdateMessages()` for the failure semantics. */
|
|
621
|
+
export declare function setMessagesRead(messages: Message[], read: boolean, client?: ApiClient): Promise<Message[]>;
|
|
622
|
+
/** Flags/unflags a whole selection in one pass — see `bulkUpdateMessages()`. */
|
|
623
|
+
export declare function setMessagesFlagged(messages: Message[], flagged: boolean, client?: ApiClient): Promise<Message[]>;
|
|
624
|
+
/** Moves a whole selection into `folderUid` — bulk Move, Archive, Report junk and Delete (to Deleted Items)
|
|
625
|
+
* are all this call with a different target folder. See `bulkUpdateMessages()`. */
|
|
626
|
+
export declare function moveMessages(messages: Message[], folderUid: string, client?: ApiClient): Promise<Message[]>;
|
|
627
|
+
/** Sets the full `labelUids` list on a whole selection — see `setMessageLabels()` and `bulkUpdateMessages()`. */
|
|
628
|
+
export declare function setMessagesLabels(messages: Message[], labelUids: string[], client?: ApiClient): Promise<Message[]>;
|
|
629
|
+
/** Sets a message's full `labelUids` list (not an add/remove delta - the caller computes the complete
|
|
630
|
+
* new set, same convention as `Note`/`Task` label-like fields elsewhere in restapi). Deleting a label
|
|
631
|
+
* elsewhere already strips it server-side from every message (`labelsApi.ts#deleteLabel()`'s own doc
|
|
632
|
+
* comment) - this is only for a user explicitly applying/removing labels on one message. */
|
|
633
|
+
export declare function setMessageLabels(message: Message, labelUids: string[], client?: ApiClient): Promise<Message>;
|
|
634
|
+
/**
|
|
635
|
+
* Cancels a scheduled send by moving the message out of Outbox into `draftsFolderUid` (the mailbox's Drafts
|
|
636
|
+
* folder, which the caller resolves). The server clears `scheduledSendTime` itself on any move out of Outbox;
|
|
637
|
+
* the `null` sent here is accepted and ignored.
|
|
638
|
+
*/
|
|
639
|
+
export declare function cancelScheduledSend(message: Message, draftsFolderUid: string, client?: ApiClient): Promise<Message>;
|
|
640
|
+
/**
|
|
641
|
+
* Sets a draft's `requestReceipt` ahead of calling `sendMessage()`, overriding the mailbox's own
|
|
642
|
+
* `alwaysRequestReceiptInternal`/`External` defaults for this one message — same ordinary-`PUT`-before-
|
|
643
|
+
* `send()` convention.
|
|
644
|
+
*/
|
|
645
|
+
export declare function setMessageRequestReceipt(message: Message, requestReceipt: boolean, client?: ApiClient): Promise<Message>;
|
|
646
|
+
/**
|
|
647
|
+
* Thrown by `setMessageVerificationSeal()` when restapi answers `409`: the message already carries a different seal the
|
|
648
|
+
* server won't replace (it replaces one only when the stored seal's generation is older than the vault's current
|
|
649
|
+
* `masterKeyGeneration` and the request's generation equals the current one). Still an `ApiRequestError` (`status` 409).
|
|
650
|
+
* A caller writing seals best effort should ignore it.
|
|
651
|
+
*/
|
|
652
|
+
export declare class VerificationSealConflictError extends ApiRequestError {
|
|
653
|
+
constructor(message: string, code?: string);
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Stores a verification seal on a message (`PUT /mail/messages/:id/verification-seal` with
|
|
657
|
+
* `{ seal, masterKeyGeneration }`), normally `MessageSecurityResult.sealToWrite`'s two fields from
|
|
658
|
+
* `crypto/messageSecurity.ts`'s `evaluateMessageSecurityWithSeal()`. Resolves with the updated message; storing the
|
|
659
|
+
* identical seal again succeeds. Rejects with `VerificationSealConflictError` on `409` (a different seal is stored and
|
|
660
|
+
* isn't replaceable - see that class), and a plain `ApiRequestError` for `400` (an invalid seal or generation) and
|
|
661
|
+
* `403`/`404`.
|
|
662
|
+
*/
|
|
663
|
+
export declare function setMessageVerificationSeal(messageUid: string, seal: string, masterKeyGeneration: number, client?: ApiClient): Promise<Message>;
|
|
664
|
+
export type ReceiptType = "delivery" | "read";
|
|
665
|
+
/** Sends a delivery/read receipt this mailbox held pending the owner's explicit approval (see
|
|
666
|
+
* `Message.deliveryReceiptPending`/`readReceiptPending`). */
|
|
667
|
+
export declare function approveReceipt(uid: string, type: ReceiptType, client?: ApiClient): Promise<Message>;
|
|
668
|
+
/** Permanently declines a pending receipt — no later re-prompt for that same event. */
|
|
669
|
+
export declare function declineReceipt(uid: string, type: ReceiptType, client?: ApiClient): Promise<Message>;
|
|
670
|
+
export interface Attachment {
|
|
671
|
+
uid: string;
|
|
672
|
+
version: number;
|
|
673
|
+
dateCreated: string;
|
|
674
|
+
dateModified: string;
|
|
675
|
+
messageUid: string;
|
|
676
|
+
folderUid: string;
|
|
677
|
+
mailboxUid: string;
|
|
678
|
+
filename: string;
|
|
679
|
+
mimeType: string;
|
|
680
|
+
sizeBytes: number;
|
|
681
|
+
isInline: boolean;
|
|
682
|
+
}
|
|
683
|
+
/** Lists the attachments belonging to a single message. */
|
|
684
|
+
export declare function listAttachments(folderUid: string, messageUid: string, client?: ApiClient): Promise<Attachment[]>;
|
|
685
|
+
/** The URL to download/display an attachment's binary content — not fetched via `apiFetch`, used directly as
|
|
686
|
+
* a link/image `href`/`src`. Honors `configureApiBaseUrl()` (see `apiUrl()`). */
|
|
687
|
+
export declare function attachmentContentUrl(uid: string): string;
|
|
688
|
+
/**
|
|
689
|
+
* Uploads a file's raw bytes as a new attachment on a not-yet-sent draft. Bypasses `apiFetch` — that helper
|
|
690
|
+
* always forces `Content-Type: application/json`, which would corrupt binary content; this sends the file's
|
|
691
|
+
* own bytes/type directly instead, matching `BaseAttachmentRoute.upload`'s expectation of a raw request body.
|
|
692
|
+
*/
|
|
693
|
+
export declare function uploadAttachment(messageUid: string, file: File): Promise<Attachment>;
|
|
694
|
+
export interface ComposeRecipientInput {
|
|
695
|
+
address: string;
|
|
696
|
+
displayName?: string;
|
|
697
|
+
}
|
|
698
|
+
export interface AssembleDraftInput {
|
|
699
|
+
to: ComposeRecipientInput[];
|
|
700
|
+
cc?: ComposeRecipientInput[];
|
|
701
|
+
bcc?: ComposeRecipientInput[];
|
|
702
|
+
subject?: string;
|
|
703
|
+
html: string;
|
|
704
|
+
}
|
|
705
|
+
/** What a draft records about the thread it belongs to - see `createDraft()`. */
|
|
706
|
+
export interface DraftThreading {
|
|
707
|
+
/** The `messageId` of the message being replied to (`Message.inReplyTo`). */
|
|
708
|
+
inReplyTo?: string;
|
|
709
|
+
/** The thread's `References` chain, oldest first, ending with `inReplyTo` (`Message.references`). */
|
|
710
|
+
references?: string[];
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Creates a blank draft `Message` in the given folder (normally the mailbox's Drafts folder) to compose into.
|
|
714
|
+
*
|
|
715
|
+
* A reply MUST pass `threading` (build it with `buildReplyThreading()` from the message being replied to).
|
|
716
|
+
* `@rapidmx/restapi` writes those values into the `In-Reply-To`/`References` headers of the MIME it relays and
|
|
717
|
+
* groups the message into the replied-to message's conversation; a reply created without them is relayed with no
|
|
718
|
+
* threading headers at all, and every recipient - and the sender's own Sent Items copy - files it as a brand-new
|
|
719
|
+
* conversation. Nothing else recovers them: this server composes the MIME from the recipients, subject and HTML
|
|
720
|
+
* passed to `assembleDraft()`, which say nothing about what is being replied to.
|
|
721
|
+
*/
|
|
722
|
+
export declare function createDraft(mailboxUid: string, folderUid: string, threading?: DraftThreading, client?: ApiClient): Promise<Message>;
|
|
723
|
+
/** Deletes a message - e.g. an unsent draft that's no longer needed because compose switched to a different
|
|
724
|
+
* sending mailbox. */
|
|
725
|
+
export declare function deleteMessage(uid: string, version: number, client?: ApiClient): Promise<void>;
|
|
726
|
+
/**
|
|
727
|
+
* Permanently deletes one message - `DELETE /mail/messages/:uid?purge=true`, the hard delete: the row and its search
|
|
728
|
+
* document are gone and it cannot be restored, unlike `deleteMessage()` (a soft delete the server can bring back) or a
|
|
729
|
+
* move into Deleted Items. Whoever may delete in the message's folder may do this - the mailbox's owner, or a delegate
|
|
730
|
+
* granted `delete` - there is nothing administrative about it.
|
|
731
|
+
*
|
|
732
|
+
* Takes no `version`: one that no longer matches (another device flipped a flag since the list was fetched) would make
|
|
733
|
+
* the server answer "not found", which is no reason to keep a message the reader has asked to erase. Refused with a
|
|
734
|
+
* `409` for a message under an active legal hold (the response's message says so) or with a send in flight, and with a
|
|
735
|
+
* `403` without the `delete` grant. Nothing about the message changes when it is refused, so a caller deleting several
|
|
736
|
+
* reports each refusal and carries on with the rest.
|
|
737
|
+
*/
|
|
738
|
+
export declare function purgeMessage(uid: string, client?: ApiClient): Promise<void>;
|
|
739
|
+
/**
|
|
740
|
+
* Permanently deletes every message in a folder in one request - `DELETE /mail/messages?folderUid=` (the collection
|
|
741
|
+
* `truncate`, always a hard delete). All or nothing: the server checks every message for a legal hold first and refuses
|
|
742
|
+
* the whole request with a `409` if any is held, and with a `403` unless the caller holds the `truncate` grant on the
|
|
743
|
+
* mailbox (its owner or a manager - not a delegate who may merely delete). Resolves without saying how many messages
|
|
744
|
+
* went, so a caller that needs to says so from what it knew. Messages already soft-deleted are not part of it.
|
|
745
|
+
*
|
|
746
|
+
* After a refusal, fall back to `purgeMessage()` per message: that removes what may be removed and says which may not.
|
|
747
|
+
*/
|
|
748
|
+
export declare function emptyFolder(folderUid: string, client?: ApiClient): Promise<void>;
|
|
749
|
+
/**
|
|
750
|
+
* Assembles a draft's structured compose input (recipients/subject/HTML body, plus whatever attachments have
|
|
751
|
+
* already been `uploadAttachment()`-ed onto it) into RFC 5322 MIME and stores it as the draft's `bodyBlobKey`
|
|
752
|
+
* — see `BaseMailComposeRoute` (this app's own compose-assembly glue, since `@rapidmx/restapi`'s `send()`
|
|
753
|
+
* itself does no MIME composition). Does not send the message.
|
|
754
|
+
*/
|
|
755
|
+
export declare function assembleDraft(messageUid: string, input: AssembleDraftInput, client?: ApiClient): Promise<Message>;
|
|
756
|
+
export interface AssembleDraftRawInput {
|
|
757
|
+
to: ComposeRecipientInput[];
|
|
758
|
+
cc?: ComposeRecipientInput[];
|
|
759
|
+
bcc?: ComposeRecipientInput[];
|
|
760
|
+
/** The message's own top-level `Subject` — for an encrypted message this MUST be the outer,
|
|
761
|
+
* RFC 9788 `hcp_baseline`-obscured value (`"[...]"`, see `crypto/smimeMessage.ts`'s
|
|
762
|
+
* `applyBaselineOuterHeaders()`), matching what's already in `rawMime`'s own outer header. */
|
|
763
|
+
subject: string;
|
|
764
|
+
/** The complete RFC 5322 message source, already finalized client-side — see
|
|
765
|
+
* `crypto/smimeMessage.ts`'s `buildSignedOnlyMessage()`/`buildEncryptedMessage()`, combined with
|
|
766
|
+
* the outer envelope headers (`From`/`To`/`Cc`/`Date`/`Message-ID`/`MIME-Version`) by the caller. */
|
|
767
|
+
rawMime: string;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Stores an already-signed/encrypted draft's raw MIME source as its `bodyBlobKey`, completely
|
|
771
|
+
* unmodified — the E2E counterpart to `assembleDraft()`, for when the message body was built
|
|
772
|
+
* client-side via `crypto/smimeMessage.ts` rather than from plain HTML. Does not send the message. A
|
|
773
|
+
* draft assembled this way cannot carry file attachments yet — see `BaseMailComposeRoute.assembleRaw()`'s
|
|
774
|
+
* own doc comment in `server`.
|
|
775
|
+
*/
|
|
776
|
+
export declare function assembleDraftRaw(messageUid: string, input: AssembleDraftRawInput, client?: ApiClient): Promise<Message>;
|
|
777
|
+
/** Options for `sendMessage()`. */
|
|
778
|
+
export interface SendMessageOptions {
|
|
779
|
+
/** A future time (ISO 8601) to queue the message in Outbox until, instead of sending now. */
|
|
780
|
+
scheduledSendTime?: string;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Scans, relays, and moves an already-assembled draft into Sent Items - or, with a future
|
|
784
|
+
* `scheduledSendTime`, queues it in Outbox for `@rapidmx/restapi`'s `ScheduledSendJob`. A message already in
|
|
785
|
+
* Outbox or Sent Items is refused (409); move it back to Drafts first.
|
|
786
|
+
*/
|
|
787
|
+
export declare function sendMessage(messageUid: string, options?: SendMessageOptions, client?: ApiClient): Promise<Message>;
|
|
788
|
+
/** What `queueMessageSend()` resolves with. */
|
|
789
|
+
export interface QueuedSend {
|
|
790
|
+
/** `true`: the server accepted the message and will relay it in the background (`202 { status: "queued", message }`) - the
|
|
791
|
+
* outcome arrives as a `send-succeeded`/`send-failed`/`send-retrying` push event (see `sendEvents.ts`). `false`: a server that
|
|
792
|
+
* doesn't queue relayed it before answering, so the message has already been sent (`message` is its Sent Items copy). */
|
|
793
|
+
queued: boolean;
|
|
794
|
+
/** The message as the server holds it now - in Outbox, with its send in flight, when `queued`. */
|
|
795
|
+
message: Message;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Sends an already-assembled draft *in the background*: `POST /mail/messages/:id/send` with `{ background: true }`. The server
|
|
799
|
+
* checks the message, moves it into Outbox with a lease and answers `202 { status: "queued", message }` at once - relaying happens
|
|
800
|
+
* afterwards, and its outcome is published as push events on the mailbox's, Outbox's and Sent Items' channels rather than answered
|
|
801
|
+
* here. Rejects with the server's own error (validation, permissions: the message was not queued). A server that has no queue
|
|
802
|
+
* relays first and answers with the message, which resolves as `{ queued: false }` - as does a message class with no send job, which
|
|
803
|
+
* answers a background send `501`: it is then sent the ordinary, synchronous way.
|
|
804
|
+
*/
|
|
805
|
+
export declare function queueMessageSend(messageUid: string, client?: ApiClient): Promise<QueuedSend>;
|
|
806
|
+
/**
|
|
807
|
+
* Fetches a message's raw RFC 5322 MIME source — for client-side E2E decrypt/signature-verification
|
|
808
|
+
* only (`crypto/smimeMessage.ts`), never for display. Bypasses `apiFetch()` (which only ever decodes a
|
|
809
|
+
* JSON response body): this server-local route (`BaseMessageRawContentRoute.ts` in `server`, mounted
|
|
810
|
+
* alongside `@rapidmx/restapi`'s own `MessageRoute`) returns `message/rfc822`, not JSON — the one thing
|
|
811
|
+
* that library's own `GET /:id/content` deliberately never serves (see that route's own doc comment).
|
|
812
|
+
*
|
|
813
|
+
* Returns a *binary string* - the response bytes decoded as Latin-1, exactly one character per byte -
|
|
814
|
+
* rather than `res.text()`'s UTF-8 decoding, which would replace every invalid byte of a non-UTF-8 8bit
|
|
815
|
+
* part with U+FFFD before its own `charset` is known and break any signature over those bytes. Pass it
|
|
816
|
+
* straight to `evaluateMessageSecurity()` (see `crypto/mime.ts`'s doc comment on binary strings); it is
|
|
817
|
+
* not display text.
|
|
818
|
+
*/
|
|
819
|
+
export declare function getMessageRawContent(messageUid: string): Promise<string>;
|
|
820
|
+
export interface ImpersonationResult {
|
|
821
|
+
token: string;
|
|
822
|
+
user: {
|
|
823
|
+
uid: string;
|
|
824
|
+
roles: string[];
|
|
825
|
+
scopes: string[];
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Trusted-role-only: starts an admin "log in as user" session. In production this calls auth-server
|
|
830
|
+
* directly (not this app's own API) since only auth-server can mint a token carrying `userUid`'s real
|
|
831
|
+
* roles/scopes the way its own sign-in flow would — see `@rapidrest/auth`'s `BaseImpersonationRoute` and
|
|
832
|
+
* this repo's `.claude/NOTES.md`. The browser's `jwt` cookie is swapped for the freshly-minted token, and
|
|
833
|
+
* the caller's own session is stashed (`jwt_impersonator`) so `stopImpersonating()` can restore it later.
|
|
834
|
+
* The caller is responsible for navigating to `/` afterward — this call only swaps the cookie, it doesn't
|
|
835
|
+
* redirect.
|
|
836
|
+
*
|
|
837
|
+
* @param impersonationBaseUrl The origin to call — the real auth-server in production, or `""` under
|
|
838
|
+
* `yarn dev` (see `AdminConsoleRoute`/`wwwRoute`'s `fetchProps`) to instead call this app's own local
|
|
839
|
+
* dev-only endpoint (`DevImpersonationRoute`), since a real auth-server isn't running locally.
|
|
840
|
+
*/
|
|
841
|
+
export declare function impersonateUser(impersonationBaseUrl: string, userUid: string): Promise<ImpersonationResult>;
|
|
842
|
+
/**
|
|
843
|
+
* Ends an active impersonation session, restoring the admin's own — a no-op (`restored: false`) if none is
|
|
844
|
+
* active. POST, not GET: this mutates state (swaps the active `jwt` cookie back), and a state-changing GET
|
|
845
|
+
* is exploitable via a bare navigation — no form or script required at all — bypassing CSRF defenses
|
|
846
|
+
* entirely, since they only ever apply to non-safe methods. See `@rapidrest/auth`'s `BaseImpersonationRoute`.
|
|
847
|
+
*/
|
|
848
|
+
export declare function stopImpersonating(impersonationBaseUrl: string): Promise<{
|
|
849
|
+
restored: boolean;
|
|
850
|
+
}>;
|