@dereekb/firebase-server 13.11.1 → 13.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +29 -2
- package/index.esm.js +30 -3
- package/mailgun/package.json +9 -9
- package/model/index.cjs.js +330 -43
- package/model/index.esm.js +332 -46
- package/model/package.json +9 -9
- package/model/src/lib/notification/notification.action.server.d.ts +16 -1
- package/model/src/lib/notification/notification.module.d.ts +4 -0
- package/oidc/index.cjs.js +2 -52
- package/oidc/index.esm.js +2 -47
- package/oidc/package.json +10 -10
- package/oidc/src/lib/scope.d.ts +1 -41
- package/package.json +10 -10
- package/src/lib/firestore/array.d.ts +1 -0
- package/src/lib/firestore/driver.accessor.batch.d.ts +1 -0
- package/src/lib/firestore/driver.accessor.default.d.ts +1 -0
- package/src/lib/firestore/driver.accessor.transaction.d.ts +1 -0
- package/src/lib/firestore/driver.query.d.ts +1 -0
- package/src/lib/firestore/increment.d.ts +1 -0
- package/src/lib/firestore/snapshot/snapshot.field.encrypt.d.ts +2 -0
- package/src/lib/nest/app.module.d.ts +1 -0
- package/src/lib/nest/auth/auth.module.d.ts +1 -0
- package/src/lib/nest/development/development.app.function.d.ts +1 -0
- package/src/lib/nest/development/development.function.d.ts +1 -0
- package/src/lib/nest/development/development.schedule.function.d.ts +1 -0
- package/src/lib/nest/development/development.schedule.function.error.d.ts +1 -0
- package/src/lib/nest/function/call.d.ts +1 -0
- package/src/lib/nest/function/context.d.ts +1 -0
- package/src/lib/nest/function/v2/blocking.d.ts +2 -0
- package/src/lib/nest/function/v2/call.d.ts +2 -0
- package/src/lib/nest/function/v2/event.d.ts +1 -0
- package/src/lib/nest/function/v2/schedule.d.ts +3 -0
- package/src/lib/nest/function/v2/taskqueue.d.ts +1 -0
- package/src/lib/nest/model/analytics.handler.d.ts +1 -0
- package/src/lib/nest/model/call.model.function.d.ts +1 -0
- package/src/lib/nest/model/create.model.function.d.ts +1 -0
- package/src/lib/nest/storage/storage.module.d.ts +1 -0
- package/test/package.json +11 -11
- package/zoho/package.json +9 -9
package/model/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { mapObjectKeysToLowercase, multiValueMapBuilder, batch, runAsyncTasksForValues, asArray, pushArrayItemsIntoArray, UNSET_INDEX_NUMBER, areEqualPOJOValues, performAsyncTasks, removeValuesAtIndexesFromArrayCopy, takeFront, makeModelMap, computeNextFreeIndexOnSortedValuesFunction, readIndexNumber, asPromise, dateOrMillisecondsToDate, filterOnlyUndefinedValues, iterablesAreSetEquivalent, mapIdentityFunction, makeValuesGroupMap,
|
|
1
|
+
import { mapObjectKeysToLowercase, multiValueMapBuilder, batch, runAsyncTasksForValues, asArray, pushArrayItemsIntoArray, UNSET_INDEX_NUMBER, areEqualPOJOValues, performAsyncTasks, removeValuesAtIndexesFromArrayCopy, takeFront, makeModelMap, computeNextFreeIndexOnSortedValuesFunction, readIndexNumber, asPromise, dateOrMillisecondsToDate, filterOnlyUndefinedValues, iterablesAreSetEquivalent, mapIdentityFunction, makeValuesGroupMap, filterMaybeArrayValues, cutStringFunction, takeLast, separateValues, unique, mergeSlashPaths, ModelRelationUtility, isThrottled, isPast, unixDateTimeSecondsNumberFromDate, slashPathDetails, MS_IN_MINUTE, expirationDetails, dateFromDateOrTimeMillisecondsNumber, cachedGetter, MS_IN_HOUR, documentFileExtensionForMimeType, useCallback, ZIP_FILE_MIME_TYPE, MAP_IDENTITY, pushItemOrArrayItemsIntoArray, asDecisionFunction } from '@dereekb/util';
|
|
2
2
|
import { yearWeekCode, isSameDate, findMaxDate, findMinDate } from '@dereekb/date';
|
|
3
|
-
import { CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, firestoreDummyKey, mergeNotificationBoxRecipients, mergeNotificationUserNotificationBoxRecipientConfigs, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, mergeNotificationBoxRecipientTemplateConfigs, effectiveNotificationBoxRecipientTemplateConfig, notificationSendExclusionCanSendFunction, mergeNotificationUserDefaultNotificationBoxRecipientConfig, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, NotificationRecipientSendFlag, allowedNotificationRecipients, loadDocumentsForIds, getDocumentSnapshotDataPairsWithData, cleanupSentNotificationsParamsType, createNotificationBoxParamsType, createNotificationSummaryParamsType, createNotificationUserParamsType, resyncNotificationUserParamsType, sendNotificationParamsType, sendQueuedNotificationsParamsType, updateNotificationBoxParamsType, updateNotificationBoxRecipientParamsType, updateNotificationSummaryParamsType, updateNotificationUserParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientConfig, updateNotificationUserNotificationBoxRecipientConfigs, calculateNsForNotificationUserNotificationBoxRecipientConfigs, getDocumentSnapshotDataPairs, iterateFirestoreDocumentSnapshotPairs, notificationUsersFlaggedForNeedsSyncQuery, notificationSummaryIdForModel, loadNotificationBoxDocumentForReferencePair, updateNotificationUserNotificationSendExclusions, notificationBoxRecipientTemplateConfigArrayToRecord, updateNotificationRecipient, setIdAndKeyFromKeyIdRefOnDocumentData, inferKeyFromTwoWayFlatFirestoreModelKey, NotificationSendType, getDocumentSnapshotData, notificationSendFlagsImplyIsComplete, NotificationSendState, mergeNotificationSendMessagesResult, notificationsPastSendAtTimeQuery,
|
|
3
|
+
import { CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE, NOTIFICATION_BOX_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_BOX_EXCLUSION_TARGET_INVALID_ERROR_CODE, NOTIFICATION_BOX_EXISTS_FOR_MODEL_ERROR_CODE, NOTIFICATION_BOX_RECIPIENT_DOES_NOT_EXIST_ERROR_CODE, NOTIFICATION_MODEL_ALREADY_INITIALIZED_ERROR_CODE, NOTIFICATION_USER_BLOCKED_FROM_BEING_ADD_TO_RECIPIENTS_ERROR_CODE, NOTIFICATION_USER_INVALID_UID_FOR_CREATE_ERROR_CODE, NOTIFICATION_USER_LOCKED_CONFIG_FROM_BEING_UPDATED_ERROR_CODE, firestoreDummyKey, mergeNotificationBoxRecipients, mergeNotificationUserNotificationBoxRecipientConfigs, applyExclusionsToNotificationUserNotificationBoxRecipientConfigs, mergeNotificationBoxRecipientTemplateConfigs, effectiveNotificationBoxRecipientTemplateConfig, notificationSendExclusionCanSendFunction, mergeNotificationUserDefaultNotificationBoxRecipientConfig, DEFAULT_NOTIFICATION_TEMPLATE_TYPE, NotificationRecipientSendFlag, allowedNotificationRecipients, loadDocumentsForIds, getDocumentSnapshotDataPairsWithData, cleanupOldNotificationLoggedEventDaysParamsType, cleanupSentNotificationsParamsType, createNotificationBoxParamsType, createNotificationSummaryParamsType, createNotificationUserParamsType, resyncNotificationUserParamsType, sendNotificationParamsType, sendQueuedNotificationsParamsType, updateNotificationBoxParamsType, updateNotificationBoxRecipientParamsType, updateNotificationSummaryParamsType, updateNotificationUserParamsType, updateNotificationUserDefaultNotificationBoxRecipientConfig, effectiveNotificationBoxRecipientConfig, updateNotificationUserNotificationBoxRecipientConfigs, calculateNsForNotificationUserNotificationBoxRecipientConfigs, getDocumentSnapshotDataPairs, iterateFirestoreDocumentSnapshotPairs, notificationUsersFlaggedForNeedsSyncQuery, notificationSummaryIdForModel, loadNotificationBoxDocumentForReferencePair, updateNotificationUserNotificationSendExclusions, notificationBoxRecipientTemplateConfigArrayToRecord, updateNotificationRecipient, setIdAndKeyFromKeyIdRefOnDocumentData, inferKeyFromTwoWayFlatFirestoreModelKey, NotificationSendType, getDocumentSnapshotData, notificationSendFlagsImplyIsComplete, NotificationSendState, mergeNotificationSendMessagesResult, notificationsPastSendAtTimeQuery, loadDocumentsForDocumentReferencesFromValues, notificationLoggedEventDayId, shouldSaveNotificationToNotificationWeek, notificationsReadyForCleanupQuery, notificationLoggedEventDaysOlderThanQuery, initializeAllApplicableNotificationBoxesParamsType, initializeAllApplicableNotificationSummariesParamsType, initializeNotificationModelParamsType, firestoreModelKeyCollectionName, notificationBoxesFlaggedForNeedsInitializationQuery, notificationSummariesFlaggedForNeedsInitializationQuery, noContentNotificationMessageFunctionFactory, _createNotificationDocumentFromPair, createNotificationDocumentPair, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_SUBJECT_MAX_LENGTH, NOTIFICATION_SUMMARY_EMBEDDED_NOTIFICATION_ITEM_MESSAGE_MAX_LENGTH, sortNotificationItemsFunction, NOTIFICATION_SUMMARY_ITEM_LIMIT, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING, NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP, completeSubtaskProcessingAndScheduleCleanupTaskResult, delayCompletion, notificationTaskComplete, notificationTaskDelayRetry, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_DELAY, DEFAULT_NOTIFICATION_TASK_SUBTASK_CLEANUP_RETRY_ATTEMPTS, STORAGE_FILE_GROUP_CREATE_INPUT_ERROR_CODE, STORAGE_FILE_ALREADY_PROCESSED_ERROR_CODE, STORAGE_FILE_CANNOT_BE_DELETED_YET_ERROR_CODE, STORAGE_FILE_GROUP_QUEUED_FOR_INITIALIZATION_ERROR_CODE, STORAGE_FILE_MODEL_ALREADY_INITIALIZED_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_DELETION_ERROR_CODE, STORAGE_FILE_NOT_FLAGGED_FOR_GROUPS_SYNC_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_ALLOWED_FOR_INVALID_STATE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_AVAILABLE_FOR_TYPE_ERROR_CODE, STORAGE_FILE_PROCESSING_NOT_QUEUED_FOR_PROCESSING_ERROR_CODE, UPLOADED_FILE_DOES_NOT_EXIST_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_DISCARDED_ERROR_CODE, UPLOADED_FILE_INITIALIZATION_FAILED_ERROR_CODE, UPLOADED_FILE_NOT_ALLOWED_TO_BE_INITIALIZED_ERROR_CODE, createStorageFileParamsType, createStorageFileGroupParamsType, deleteAllQueuedStorageFilesParamsType, deleteStorageFileParamsType, downloadMultipleStorageFilesParamsType, downloadStorageFileParamsType, initializeAllStorageFilesFromUploadsParamsType, initializeStorageFileFromUploadParamsType, processAllQueuedStorageFilesParamsType, processStorageFileParamsType, regenerateAllFlaggedStorageFileGroupsContentParamsType, regenerateStorageFileGroupContentParamsType, syncAllFlaggedStorageFilesWithGroupsParamsType, syncStorageFileWithGroupsParamsType, updateStorageFileParamsType, updateStorageFileGroupParamsType, UPLOADS_FOLDER_PATH, iterateStorageListFilesByEachFile, StorageFileProcessingState, storageFilesQueuedForProcessingQuery, STORAGE_FILE_PROCESSING_STUCK_THROTTLE_CHECK_MS, StorageFileState, createNotificationDocument, storageFileProcessingNotificationTaskTemplate, storageFilesQueuedForDeleteQuery, loadStorageFileGroupDocumentForReferencePair, calculateStorageFileGroupEmbeddedFileUpdate, iterateFirestoreDocumentSnapshotPairBatches, storageFileFlaggedForSyncWithGroupsQuery, createStorageFileDocumentPairFactory, StorageFileCreationType, calculateStorageFileGroupRegeneration, storageFileGroupZipFileStoragePath, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE, getDocumentSnapshotDataPair, storageFileGroupsFlaggedForContentRegenerationQuery, initializeAllApplicableStorageFileGroupsParamsType, initializeStorageFileModelParamsType, storageFileGroupsFlaggedForNeedsInitializationQuery, STORAGE_FILE_GROUP_ZIP_STORAGE_FILE_PURPOSE_CREATE_ZIP_SUBTASK, storedFileReaderFactory, STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_TYPE, copyStoragePath, notificationSubtaskComplete, STORAGE_FILE_GROUP_ZIP_INFO_JSON_FILE_NAME, limitUploadFileTypeDeterminer, combineUploadFileTypeDeterminers, STORAGEFILE_RELATED_FILE_METADATA_KEY, storageFilePurposeAndUserQuery } from '@dereekb/firebase';
|
|
4
4
|
import { preconditionConflictError, assertSnapshotData, internalServerError } from '@dereekb/firebase-server';
|
|
5
5
|
import { hoursToMilliseconds, addHours, isFuture, addMinutes, addSeconds, addDays } from 'date-fns';
|
|
6
6
|
import { Optional, Inject, Injectable, Module, Global } from '@nestjs/common';
|
|
@@ -1512,7 +1512,8 @@ function _ts_generator$d(thisArg, body) {
|
|
|
1512
1512
|
updateNotificationBoxRecipient: updateNotificationBoxRecipientFactory(context),
|
|
1513
1513
|
sendNotification: sendNotificationFactory(context),
|
|
1514
1514
|
sendQueuedNotifications: sendQueuedNotificationsFactory(context),
|
|
1515
|
-
cleanupSentNotifications: cleanupSentNotificationsFactory(context)
|
|
1515
|
+
cleanupSentNotifications: cleanupSentNotificationsFactory(context),
|
|
1516
|
+
cleanupOldNotificationLoggedEventDays: cleanupOldNotificationLoggedEventDaysFactory(context)
|
|
1516
1517
|
};
|
|
1517
1518
|
}
|
|
1518
1519
|
// MARK: Actions
|
|
@@ -2745,7 +2746,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
2745
2746
|
2,
|
|
2746
2747
|
function(inputNotificationDocument) {
|
|
2747
2748
|
return _async_to_generator$d(function() {
|
|
2748
|
-
var now, notificationDocument, _ref, nextSat, throttled, tryRun, isNotificationTask, notificationTaskHandler, notification, createdBox, notificationBoxNeedsInitialization, notificationBox, notificationBoxModelKey, deletedNotification, templateInstance, isConfiguredTemplateType, isKnownTemplateType, onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients, success, isUniqueNotificationTask, uniqueNotificationTaskConflict, sendEmailsResult, sendTextsResult, sendNotificationSummaryResult, loadMessageFunctionFailure, buildMessageFailure, notificationMarkedDone, notificationTaskCompletionType, notificationTaskPartsRunCount, notificationTaskLoopingProtectionTriggered, onSendAttemptedResult, onSendSuccessResult, notificationTemplateType, result;
|
|
2749
|
+
var now, notificationDocument, _ref, nextSat, throttled, tryRun, isNotificationTask, isLoggedEvent, notificationTaskHandler, notification, createdBox, notificationBoxNeedsInitialization, notificationBox, notificationBoxModelKey, deletedNotification, templateInstance, isConfiguredTemplateType, isKnownTemplateType, onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients, success, isUniqueNotificationTask, uniqueNotificationTaskConflict, sendEmailsResult, sendTextsResult, sendNotificationSummaryResult, loadMessageFunctionFailure, buildMessageFailure, notificationMarkedDone, notificationTaskCompletionType, notificationTaskPartsRunCount, notificationTaskLoopingProtectionTriggered, onSendAttemptedResult, onSendSuccessResult, notificationTemplateType, result;
|
|
2749
2750
|
function _runNotificationTaskNextPart(input) {
|
|
2750
2751
|
return _async_to_generator$d(function() {
|
|
2751
2752
|
var _notification_at, notification, notificationTaskHandler, previouslyCompleteSubTasks, item, cat, ut, tryRunNextPart, partNotificationTaskCompletionType, partNotificationMarkedDone, partTprReversal, partSuccess, nextCompleteSubTasks, unique, notificationTask, notificationTemplate, handleTaskResult, completion, updateMetadata, delayUntil, canRunNextCheckpoint, allCompletedSubTasks, _notification_at1, _notification_at2, tprChanged, subtaskTprChanged, _findMaxDate, minimumNextSatTime, e, saveTaskResult, latestNotification;
|
|
@@ -3497,6 +3498,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3497
3498
|
case NotificationSendType.INIT_BOX_AND_SEND:
|
|
3498
3499
|
case NotificationSendType.SEND_WITHOUT_CREATING_BOX:
|
|
3499
3500
|
case NotificationSendType.TASK_NOTIFICATION:
|
|
3501
|
+
case NotificationSendType.LOGGED_EVENT:
|
|
3500
3502
|
break;
|
|
3501
3503
|
}
|
|
3502
3504
|
_state.label = 48;
|
|
@@ -3518,7 +3520,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3518
3520
|
4,
|
|
3519
3521
|
firestoreContext.runTransaction(function(transaction) {
|
|
3520
3522
|
return _async_to_generator$d(function() {
|
|
3521
|
-
var notificationBoxDocument, notificationDocumentInTransaction, _ref, initialNotificationBox, notification, notificationBox, model, isNotificationTask, tryRun, throttled, nextSat, createdBox, deletedNotification, notificationBoxNeedsInitialization, isKnownTemplateType, isConfiguredTemplateType, onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients, templateInstance, notificationTaskHandler, t // notification task/template type
|
|
3523
|
+
var notificationBoxDocument, notificationDocumentInTransaction, _ref, initialNotificationBox, notification, notificationBox, model, isNotificationTask, isLoggedEvent, tryRun, throttled, nextSat, createdBox, deletedNotification, notificationBoxNeedsInitialization, isKnownTemplateType, isConfiguredTemplateType, onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients, templateInstance, notificationTaskHandler, t // notification task/template type
|
|
3522
3524
|
, delay, _notification_ois, _notification_ots, templateTypeInfo, retryAttempts, delay1, _, notificationBoxTemplate, isAtMaxAttempts, a;
|
|
3523
3525
|
function deleteNotification() {
|
|
3524
3526
|
return _async_to_generator$d(function() {
|
|
@@ -3560,9 +3562,13 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3560
3562
|
notificationBox = initialNotificationBox;
|
|
3561
3563
|
model = inferKeyFromTwoWayFlatFirestoreModelKey(notificationBoxDocument.id);
|
|
3562
3564
|
isNotificationTask = (notification === null || notification === void 0 ? void 0 : notification.st) === NotificationSendType.TASK_NOTIFICATION;
|
|
3565
|
+
// Defensive short-circuit. Logged events are persisted with d=true and NO_TRY channel
|
|
3566
|
+
// states from creation, so the send queue never returns them. This branch only triggers
|
|
3567
|
+
// when sendNotification() is invoked directly on a logged-event document.
|
|
3568
|
+
isLoggedEvent = (notification === null || notification === void 0 ? void 0 : notification.st) === NotificationSendType.LOGGED_EVENT;
|
|
3563
3569
|
tryRun = true;
|
|
3564
3570
|
throttled = false;
|
|
3565
|
-
if (!notification) {
|
|
3571
|
+
if (!notification || isLoggedEvent) {
|
|
3566
3572
|
tryRun = false;
|
|
3567
3573
|
} else if (!ignoreSendAtThrottle) {
|
|
3568
3574
|
tryRun = !isFuture(notification.sat);
|
|
@@ -3585,7 +3591,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3585
3591
|
notificationBoxNeedsInitialization = false;
|
|
3586
3592
|
if (!(notification && tryRun)) return [
|
|
3587
3593
|
3,
|
|
3588
|
-
|
|
3594
|
+
20
|
|
3589
3595
|
];
|
|
3590
3596
|
// if we're still trying to run, check the template is ok. If not, cancel the run.
|
|
3591
3597
|
t = notification.n.t;
|
|
@@ -3642,7 +3648,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3642
3648
|
case 7:
|
|
3643
3649
|
return [
|
|
3644
3650
|
3,
|
|
3645
|
-
|
|
3651
|
+
20
|
|
3646
3652
|
];
|
|
3647
3653
|
case 8:
|
|
3648
3654
|
templateInstance = notificationTemplateService.templateInstanceForType(t);
|
|
@@ -3687,7 +3693,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3687
3693
|
case 11:
|
|
3688
3694
|
if (!(!notificationBox && tryRun)) return [
|
|
3689
3695
|
3,
|
|
3690
|
-
|
|
3696
|
+
19
|
|
3691
3697
|
];
|
|
3692
3698
|
_ = notification.st;
|
|
3693
3699
|
switch(_){
|
|
@@ -3711,10 +3717,15 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3711
3717
|
3,
|
|
3712
3718
|
17
|
|
3713
3719
|
];
|
|
3720
|
+
case NotificationSendType.LOGGED_EVENT:
|
|
3721
|
+
return [
|
|
3722
|
+
3,
|
|
3723
|
+
18
|
|
3724
|
+
];
|
|
3714
3725
|
}
|
|
3715
3726
|
return [
|
|
3716
3727
|
3,
|
|
3717
|
-
|
|
3728
|
+
19
|
|
3718
3729
|
];
|
|
3719
3730
|
case 12:
|
|
3720
3731
|
return [
|
|
@@ -3729,7 +3740,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3729
3740
|
createdBox = true;
|
|
3730
3741
|
return [
|
|
3731
3742
|
3,
|
|
3732
|
-
|
|
3743
|
+
19
|
|
3733
3744
|
];
|
|
3734
3745
|
case 14:
|
|
3735
3746
|
// delete the notification since it won't get sent.
|
|
@@ -3741,49 +3752,56 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3741
3752
|
_state.sent();
|
|
3742
3753
|
return [
|
|
3743
3754
|
3,
|
|
3744
|
-
|
|
3755
|
+
19
|
|
3745
3756
|
];
|
|
3746
3757
|
case 16:
|
|
3747
3758
|
// continue with current tryRun
|
|
3748
3759
|
return [
|
|
3749
3760
|
3,
|
|
3750
|
-
|
|
3761
|
+
19
|
|
3751
3762
|
];
|
|
3752
3763
|
case 17:
|
|
3753
3764
|
// task notifications do not require a notification box; continue with current tryRun
|
|
3754
3765
|
return [
|
|
3755
3766
|
3,
|
|
3756
|
-
|
|
3767
|
+
19
|
|
3757
3768
|
];
|
|
3758
3769
|
case 18:
|
|
3770
|
+
// unreachable in normal operation — logged events are short-circuited above. Kept
|
|
3771
|
+
// here so the enum exhaustiveness check stays satisfied.
|
|
3772
|
+
return [
|
|
3773
|
+
3,
|
|
3774
|
+
19
|
|
3775
|
+
];
|
|
3776
|
+
case 19:
|
|
3759
3777
|
// if the notification box is not initialized/synchronized yet, do not run.
|
|
3760
3778
|
if (tryRun && (notificationBox === null || notificationBox === void 0 ? void 0 : notificationBox.s)) {
|
|
3761
3779
|
notificationBoxNeedsInitialization = true;
|
|
3762
3780
|
tryRun = false;
|
|
3763
3781
|
nextSat = addMinutes(now, NOTIFICATION_BOX_NOT_INITIALIZED_DELAY_MINUTES);
|
|
3764
3782
|
}
|
|
3765
|
-
_state.label =
|
|
3766
|
-
case
|
|
3783
|
+
_state.label = 20;
|
|
3784
|
+
case 20:
|
|
3767
3785
|
if (!(notification != null && nextSat != null && !deletedNotification)) return [
|
|
3768
3786
|
3,
|
|
3769
|
-
|
|
3787
|
+
24
|
|
3770
3788
|
];
|
|
3771
3789
|
isAtMaxAttempts = notification.a >= NOTIFICATION_MAX_SEND_ATTEMPTS;
|
|
3772
3790
|
if (!(isAtMaxAttempts && notificationBoxNeedsInitialization)) return [
|
|
3773
3791
|
3,
|
|
3774
|
-
|
|
3792
|
+
22
|
|
3775
3793
|
];
|
|
3776
3794
|
return [
|
|
3777
3795
|
4,
|
|
3778
3796
|
deleteNotification()
|
|
3779
3797
|
];
|
|
3780
|
-
case 20:
|
|
3781
|
-
_state.sent(); // just delete the notification if the box still hasn't been initialized successfully at this point.
|
|
3782
|
-
_state.label = 21;
|
|
3783
3798
|
case 21:
|
|
3799
|
+
_state.sent(); // just delete the notification if the box still hasn't been initialized successfully at this point.
|
|
3800
|
+
_state.label = 22;
|
|
3801
|
+
case 22:
|
|
3784
3802
|
if (!!deletedNotification) return [
|
|
3785
3803
|
3,
|
|
3786
|
-
|
|
3804
|
+
24
|
|
3787
3805
|
];
|
|
3788
3806
|
a = isNotificationTask && tryRun ? notification.a : notification.a + 1; // do not update a notification task's attempt count here, unless tryRun fails
|
|
3789
3807
|
// NOTE: It is important to update sat so the notification task queue running doesn't get stuck in a query loop by notifications/tasks that have a sat value that is in the past, but was just run.
|
|
@@ -3794,16 +3812,17 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3794
3812
|
a: a
|
|
3795
3813
|
})
|
|
3796
3814
|
];
|
|
3797
|
-
case 22:
|
|
3798
|
-
_state.sent();
|
|
3799
|
-
_state.label = 23;
|
|
3800
3815
|
case 23:
|
|
3816
|
+
_state.sent();
|
|
3817
|
+
_state.label = 24;
|
|
3818
|
+
case 24:
|
|
3801
3819
|
return [
|
|
3802
3820
|
2,
|
|
3803
3821
|
{
|
|
3804
3822
|
nextSat: nextSat,
|
|
3805
3823
|
throttled: throttled,
|
|
3806
3824
|
isNotificationTask: isNotificationTask,
|
|
3825
|
+
isLoggedEvent: isLoggedEvent,
|
|
3807
3826
|
deletedNotification: deletedNotification,
|
|
3808
3827
|
createdBox: createdBox,
|
|
3809
3828
|
notificationBoxModelKey: model,
|
|
@@ -3825,7 +3844,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3825
3844
|
})
|
|
3826
3845
|
];
|
|
3827
3846
|
case 1:
|
|
3828
|
-
_ref = _state.sent(), nextSat = _ref.nextSat, throttled = _ref.throttled, tryRun = _ref.tryRun, isNotificationTask = _ref.isNotificationTask, notificationTaskHandler = _ref.notificationTaskHandler, notification = _ref.notification, createdBox = _ref.createdBox, notificationBoxNeedsInitialization = _ref.notificationBoxNeedsInitialization, notificationBox = _ref.notificationBox, notificationBoxModelKey = _ref.notificationBoxModelKey, deletedNotification = _ref.deletedNotification, templateInstance = _ref.templateInstance, isConfiguredTemplateType = _ref.isConfiguredTemplateType, isKnownTemplateType = _ref.isKnownTemplateType, onlySendToExplicitlyEnabledRecipients = _ref.onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients = _ref.onlyTextExplicitlyEnabledRecipients;
|
|
3847
|
+
_ref = _state.sent(), nextSat = _ref.nextSat, throttled = _ref.throttled, tryRun = _ref.tryRun, isNotificationTask = _ref.isNotificationTask, isLoggedEvent = _ref.isLoggedEvent, notificationTaskHandler = _ref.notificationTaskHandler, notification = _ref.notification, createdBox = _ref.createdBox, notificationBoxNeedsInitialization = _ref.notificationBoxNeedsInitialization, notificationBox = _ref.notificationBox, notificationBoxModelKey = _ref.notificationBoxModelKey, deletedNotification = _ref.deletedNotification, templateInstance = _ref.templateInstance, isConfiguredTemplateType = _ref.isConfiguredTemplateType, isKnownTemplateType = _ref.isKnownTemplateType, onlySendToExplicitlyEnabledRecipients = _ref.onlySendToExplicitlyEnabledRecipients, onlyTextExplicitlyEnabledRecipients = _ref.onlyTextExplicitlyEnabledRecipients;
|
|
3829
3848
|
success = false;
|
|
3830
3849
|
isUniqueNotificationTask = false;
|
|
3831
3850
|
uniqueNotificationTaskConflict = false;
|
|
@@ -3834,33 +3853,48 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
3834
3853
|
notificationMarkedDone = false;
|
|
3835
3854
|
notificationTaskPartsRunCount = 0;
|
|
3836
3855
|
notificationTemplateType = templateInstance === null || templateInstance === void 0 ? void 0 : templateInstance.type;
|
|
3856
|
+
if (!isLoggedEvent) return [
|
|
3857
|
+
3,
|
|
3858
|
+
2
|
|
3859
|
+
];
|
|
3860
|
+
// Logged events bypass the send pipeline entirely. The document is persisted with d=true
|
|
3861
|
+
// and NO_TRY channel states from creation, so there's nothing to dispatch — just report
|
|
3862
|
+
// success so the result lands in the cleanup pile rather than the failure pile.
|
|
3863
|
+
success = true;
|
|
3864
|
+
notificationMarkedDone = (notification === null || notification === void 0 ? void 0 : notification.d) === true;
|
|
3865
|
+
return [
|
|
3866
|
+
3,
|
|
3867
|
+
6
|
|
3868
|
+
];
|
|
3869
|
+
case 2:
|
|
3837
3870
|
if (!isNotificationTask) return [
|
|
3838
3871
|
3,
|
|
3839
|
-
|
|
3872
|
+
4
|
|
3840
3873
|
];
|
|
3841
3874
|
return [
|
|
3842
3875
|
4,
|
|
3843
3876
|
handleNotificationTask()
|
|
3844
3877
|
];
|
|
3845
|
-
case
|
|
3878
|
+
case 3:
|
|
3846
3879
|
_state.sent();
|
|
3847
3880
|
return [
|
|
3848
3881
|
3,
|
|
3849
|
-
|
|
3882
|
+
6
|
|
3850
3883
|
];
|
|
3851
|
-
case
|
|
3884
|
+
case 4:
|
|
3852
3885
|
return [
|
|
3853
3886
|
4,
|
|
3854
3887
|
handleNormalNotification()
|
|
3855
3888
|
];
|
|
3856
|
-
case 4:
|
|
3857
|
-
_state.sent();
|
|
3858
|
-
_state.label = 5;
|
|
3859
3889
|
case 5:
|
|
3890
|
+
_state.sent();
|
|
3891
|
+
_state.label = 6;
|
|
3892
|
+
case 6:
|
|
3860
3893
|
result = {
|
|
3861
3894
|
notificationTemplateType: notificationTemplateType,
|
|
3862
3895
|
isKnownTemplateType: isKnownTemplateType,
|
|
3863
3896
|
isNotificationTask: isNotificationTask,
|
|
3897
|
+
isLoggedEvent: isLoggedEvent,
|
|
3864
3898
|
isUniqueNotificationTask: isUniqueNotificationTask,
|
|
3865
3899
|
uniqueNotificationTaskConflict: uniqueNotificationTaskConflict,
|
|
3866
3900
|
isConfiguredTemplateType: isConfiguredTemplateType,
|
|
@@ -4083,7 +4117,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4083
4117
|
* @param context - the notification server actions context with Firestore and collection access
|
|
4084
4118
|
* @returns a transform-and-validate function that cleans up sent notification documents and returns aggregate results
|
|
4085
4119
|
*/ function cleanupSentNotificationsFactory(context) {
|
|
4086
|
-
var firestoreContext = context.firestoreContext, firebaseServerActionTransformFunctionFactory = context.firebaseServerActionTransformFunctionFactory, notificationCollectionGroup = context.notificationCollectionGroup, notificationBoxCollection = context.notificationBoxCollection, notificationWeekCollectionFactory = context.notificationWeekCollectionFactory;
|
|
4120
|
+
var firestoreContext = context.firestoreContext, firebaseServerActionTransformFunctionFactory = context.firebaseServerActionTransformFunctionFactory, notificationCollectionGroup = context.notificationCollectionGroup, notificationBoxCollection = context.notificationBoxCollection, notificationWeekCollectionFactory = context.notificationWeekCollectionFactory, notificationLoggedEventDayCollectionFactory = context.notificationLoggedEventDayCollectionFactory, notificationLoggedEventDayPagedItemsCollectionFactory = context.notificationLoggedEventDayPagedItemsCollectionFactory;
|
|
4087
4121
|
return firebaseServerActionTransformFunctionFactory(cleanupSentNotificationsParamsType, function() {
|
|
4088
4122
|
return _async_to_generator$d(function() {
|
|
4089
4123
|
return _ts_generator$d(this, function(_state) {
|
|
@@ -4091,7 +4125,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4091
4125
|
2,
|
|
4092
4126
|
function() {
|
|
4093
4127
|
return _async_to_generator$d(function() {
|
|
4094
|
-
var notificationBoxesUpdatesCount, notificationsDeleted, notificationTasksDeletedCount, notificationWeeksCreated, notificationWeeksUpdated, cleanupSentNotificationsResults, notificationBoxesUpdated, result;
|
|
4128
|
+
var notificationBoxesUpdatesCount, notificationsDeleted, notificationTasksDeletedCount, notificationWeeksCreated, notificationWeeksUpdated, notificationLoggedEventsCleanedUp, cleanupSentNotificationsResults, notificationBoxesUpdated, result;
|
|
4095
4129
|
function cleanupSentNotifications() {
|
|
4096
4130
|
return _async_to_generator$d(function() {
|
|
4097
4131
|
var query, notificationDocuments, notificationDocumentsGroupedByNotificationBox;
|
|
@@ -4112,7 +4146,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4112
4146
|
2,
|
|
4113
4147
|
performAsyncTasks(notificationDocumentsGroupedByNotificationBox, function(notificationDocumentsInSameBox) {
|
|
4114
4148
|
return _async_to_generator$d(function() {
|
|
4115
|
-
var allPairs, allPairsWithDataAndMarkedDeleted,
|
|
4149
|
+
var allPairs, allPairsWithDataAndMarkedDeleted, taskPairsWithDataAndMarkedDeleted, loggedEventPairsWithDataAndMarkedDeleted, normalPairsWithDataAndMarkedDeleted, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, pair, _pair_data, pairsGroupedByWeek, pairsGroupedByWeekInBatches, pairsGroupedByLoggedEventDay, pairsGroupedByLoggedEventDayInBatches, notificationBoxDocument, notificationWeekResults, loggedEventDayResults, writeBatch, writeBatchAccessor, weeksCreated, weeksUpdated, tasksDeleted, loggedEventsCleanedUp;
|
|
4116
4150
|
return _ts_generator$d(this, function(_state) {
|
|
4117
4151
|
switch(_state.label){
|
|
4118
4152
|
case 0:
|
|
@@ -4126,10 +4160,41 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4126
4160
|
var _x_data;
|
|
4127
4161
|
return (_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.d;
|
|
4128
4162
|
});
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4163
|
+
// 3-way split: tasks → direct delete; logged events → archive to NotificationLoggedEventDay; rest → archive to NotificationWeek.
|
|
4164
|
+
taskPairsWithDataAndMarkedDeleted = [];
|
|
4165
|
+
loggedEventPairsWithDataAndMarkedDeleted = [];
|
|
4166
|
+
normalPairsWithDataAndMarkedDeleted = [];
|
|
4167
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4168
|
+
try {
|
|
4169
|
+
for(_iterator = allPairsWithDataAndMarkedDeleted[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4170
|
+
pair = _step.value;
|
|
4171
|
+
;
|
|
4172
|
+
switch((_pair_data = pair.data) === null || _pair_data === void 0 ? void 0 : _pair_data.st){
|
|
4173
|
+
case NotificationSendType.TASK_NOTIFICATION:
|
|
4174
|
+
taskPairsWithDataAndMarkedDeleted.push(pair);
|
|
4175
|
+
break;
|
|
4176
|
+
case NotificationSendType.LOGGED_EVENT:
|
|
4177
|
+
loggedEventPairsWithDataAndMarkedDeleted.push(pair);
|
|
4178
|
+
break;
|
|
4179
|
+
default:
|
|
4180
|
+
normalPairsWithDataAndMarkedDeleted.push(pair);
|
|
4181
|
+
break;
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
} catch (err) {
|
|
4185
|
+
_didIteratorError = true;
|
|
4186
|
+
_iteratorError = err;
|
|
4187
|
+
} finally{
|
|
4188
|
+
try {
|
|
4189
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4190
|
+
_iterator.return();
|
|
4191
|
+
}
|
|
4192
|
+
} finally{
|
|
4193
|
+
if (_didIteratorError) {
|
|
4194
|
+
throw _iteratorError;
|
|
4195
|
+
}
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4133
4198
|
pairsGroupedByWeek = _to_consumable_array$5(makeValuesGroupMap(normalPairsWithDataAndMarkedDeleted, function(x) {
|
|
4134
4199
|
return yearWeekCode(x.data.sat);
|
|
4135
4200
|
}).entries());
|
|
@@ -4143,6 +4208,20 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4143
4208
|
];
|
|
4144
4209
|
});
|
|
4145
4210
|
});
|
|
4211
|
+
// group logged events by ISO day string (derived from sat) for archival into NotificationLoggedEventDay.
|
|
4212
|
+
pairsGroupedByLoggedEventDay = _to_consumable_array$5(makeValuesGroupMap(loggedEventPairsWithDataAndMarkedDeleted, function(x) {
|
|
4213
|
+
return notificationLoggedEventDayId(x.data.sat);
|
|
4214
|
+
}).entries());
|
|
4215
|
+
// batch incase there are a lot of new logged events to move to a single day
|
|
4216
|
+
pairsGroupedByLoggedEventDayInBatches = pairsGroupedByLoggedEventDay.flatMap(function(x) {
|
|
4217
|
+
var batches = batch(x[1], 40);
|
|
4218
|
+
return batches.map(function(batchEntries) {
|
|
4219
|
+
return [
|
|
4220
|
+
x[0],
|
|
4221
|
+
batchEntries
|
|
4222
|
+
];
|
|
4223
|
+
});
|
|
4224
|
+
});
|
|
4146
4225
|
notificationBoxDocument = notificationBoxCollection.documentAccessor().loadDocument(notificationDocumentsInSameBox[0].parent);
|
|
4147
4226
|
return [
|
|
4148
4227
|
4,
|
|
@@ -4230,6 +4309,87 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4230
4309
|
];
|
|
4231
4310
|
case 2:
|
|
4232
4311
|
notificationWeekResults = _state.sent();
|
|
4312
|
+
return [
|
|
4313
|
+
4,
|
|
4314
|
+
performAsyncTasks(pairsGroupedByLoggedEventDayInBatches, function(param) {
|
|
4315
|
+
var _param = _sliced_to_array$2(param, 2), dayId = _param[0], notificationDocumentsInSameDay = _param[1];
|
|
4316
|
+
return _async_to_generator$d(function() {
|
|
4317
|
+
return _ts_generator$d(this, function(_state) {
|
|
4318
|
+
return [
|
|
4319
|
+
2,
|
|
4320
|
+
firestoreContext.runTransaction(function(transaction) {
|
|
4321
|
+
return _async_to_generator$d(function() {
|
|
4322
|
+
var dayCollection, dayDocument, notificationDocumentsInTransaction, pagedItems, _ref, dayWrapper, existingItems, newItems;
|
|
4323
|
+
return _ts_generator$d(this, function(_state) {
|
|
4324
|
+
switch(_state.label){
|
|
4325
|
+
case 0:
|
|
4326
|
+
dayCollection = notificationLoggedEventDayCollectionFactory(notificationBoxDocument);
|
|
4327
|
+
dayDocument = dayCollection.documentAccessorForTransaction(transaction).loadDocumentForId(dayId);
|
|
4328
|
+
notificationDocumentsInTransaction = loadDocumentsForDocumentReferencesFromValues(notificationCollectionGroup.documentAccessorForTransaction(transaction), notificationDocumentsInSameDay, function(x) {
|
|
4329
|
+
return x.snapshot.ref;
|
|
4330
|
+
});
|
|
4331
|
+
pagedItems = notificationLoggedEventDayPagedItemsCollectionFactory(dayDocument);
|
|
4332
|
+
return [
|
|
4333
|
+
4,
|
|
4334
|
+
Promise.all([
|
|
4335
|
+
dayDocument.snapshotData(),
|
|
4336
|
+
pagedItems.loadAllItems()
|
|
4337
|
+
])
|
|
4338
|
+
];
|
|
4339
|
+
case 1:
|
|
4340
|
+
_ref = _sliced_to_array$2.apply(void 0, [
|
|
4341
|
+
_state.sent(),
|
|
4342
|
+
2
|
|
4343
|
+
]), dayWrapper = _ref[0], existingItems = _ref[1];
|
|
4344
|
+
newItems = notificationDocumentsInSameDay.map(function(x) {
|
|
4345
|
+
return x.data.n;
|
|
4346
|
+
});
|
|
4347
|
+
return [
|
|
4348
|
+
4,
|
|
4349
|
+
pagedItems.writeAllItemsInTransaction(transaction, _to_consumable_array$5(existingItems).concat(_to_consumable_array$5(newItems)))
|
|
4350
|
+
];
|
|
4351
|
+
case 2:
|
|
4352
|
+
_state.sent();
|
|
4353
|
+
if (!!dayWrapper) return [
|
|
4354
|
+
3,
|
|
4355
|
+
4
|
|
4356
|
+
];
|
|
4357
|
+
return [
|
|
4358
|
+
4,
|
|
4359
|
+
dayDocument.create({
|
|
4360
|
+
d: dayId
|
|
4361
|
+
})
|
|
4362
|
+
];
|
|
4363
|
+
case 3:
|
|
4364
|
+
_state.sent();
|
|
4365
|
+
_state.label = 4;
|
|
4366
|
+
case 4:
|
|
4367
|
+
// delete the source notification docs in the same transaction
|
|
4368
|
+
return [
|
|
4369
|
+
4,
|
|
4370
|
+
Promise.all(notificationDocumentsInTransaction.map(function(x) {
|
|
4371
|
+
return x.accessor.delete();
|
|
4372
|
+
}))
|
|
4373
|
+
];
|
|
4374
|
+
case 5:
|
|
4375
|
+
_state.sent();
|
|
4376
|
+
return [
|
|
4377
|
+
2,
|
|
4378
|
+
{
|
|
4379
|
+
itemsAppended: newItems.length
|
|
4380
|
+
}
|
|
4381
|
+
];
|
|
4382
|
+
}
|
|
4383
|
+
});
|
|
4384
|
+
})();
|
|
4385
|
+
})
|
|
4386
|
+
];
|
|
4387
|
+
});
|
|
4388
|
+
})();
|
|
4389
|
+
})
|
|
4390
|
+
];
|
|
4391
|
+
case 3:
|
|
4392
|
+
loggedEventDayResults = _state.sent();
|
|
4233
4393
|
// delete all the task notifications
|
|
4234
4394
|
writeBatch = firestoreContext.batch();
|
|
4235
4395
|
writeBatchAccessor = notificationCollectionGroup.documentAccessorForTransaction(writeBatch);
|
|
@@ -4239,17 +4399,18 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4239
4399
|
return writeBatchAccessor.loadDocumentFrom(x.document).accessor.delete();
|
|
4240
4400
|
}))
|
|
4241
4401
|
];
|
|
4242
|
-
case
|
|
4402
|
+
case 4:
|
|
4243
4403
|
_state.sent();
|
|
4244
4404
|
return [
|
|
4245
4405
|
4,
|
|
4246
4406
|
writeBatch.commit()
|
|
4247
4407
|
];
|
|
4248
|
-
case
|
|
4408
|
+
case 5:
|
|
4249
4409
|
_state.sent();
|
|
4250
4410
|
weeksCreated = 0;
|
|
4251
4411
|
weeksUpdated = 0;
|
|
4252
4412
|
tasksDeleted = taskPairsWithDataAndMarkedDeleted.length;
|
|
4413
|
+
loggedEventsCleanedUp = 0;
|
|
4253
4414
|
notificationWeekResults.results.forEach(function(x) {
|
|
4254
4415
|
if (x[1].created) {
|
|
4255
4416
|
weeksCreated += 1;
|
|
@@ -4257,13 +4418,17 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4257
4418
|
weeksUpdated += 1;
|
|
4258
4419
|
}
|
|
4259
4420
|
});
|
|
4421
|
+
loggedEventDayResults.results.forEach(function(x) {
|
|
4422
|
+
loggedEventsCleanedUp += x[1].itemsAppended;
|
|
4423
|
+
});
|
|
4260
4424
|
return [
|
|
4261
4425
|
2,
|
|
4262
4426
|
{
|
|
4263
4427
|
weeksCreated: weeksCreated,
|
|
4264
4428
|
weeksUpdated: weeksUpdated,
|
|
4265
4429
|
itemsDeleted: allPairsWithDataAndMarkedDeleted.length,
|
|
4266
|
-
tasksDeleted: tasksDeleted
|
|
4430
|
+
tasksDeleted: tasksDeleted,
|
|
4431
|
+
loggedEventsCleanedUp: loggedEventsCleanedUp
|
|
4267
4432
|
}
|
|
4268
4433
|
];
|
|
4269
4434
|
}
|
|
@@ -4285,6 +4450,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4285
4450
|
notificationTasksDeletedCount = 0;
|
|
4286
4451
|
notificationWeeksCreated = 0;
|
|
4287
4452
|
notificationWeeksUpdated = 0;
|
|
4453
|
+
notificationLoggedEventsCleanedUp = 0;
|
|
4288
4454
|
_state.label = 1;
|
|
4289
4455
|
case 1:
|
|
4290
4456
|
return [
|
|
@@ -4294,10 +4460,11 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4294
4460
|
case 2:
|
|
4295
4461
|
cleanupSentNotificationsResults = _state.sent();
|
|
4296
4462
|
cleanupSentNotificationsResults.results.forEach(function(x) {
|
|
4297
|
-
var _x_ = x[1], itemsDeleted = _x_.itemsDeleted, weeksCreated = _x_.weeksCreated, weeksUpdated = _x_.weeksUpdated;
|
|
4463
|
+
var _x_ = x[1], itemsDeleted = _x_.itemsDeleted, weeksCreated = _x_.weeksCreated, weeksUpdated = _x_.weeksUpdated, loggedEventsCleanedUp = _x_.loggedEventsCleanedUp;
|
|
4298
4464
|
notificationsDeleted += itemsDeleted;
|
|
4299
4465
|
notificationWeeksCreated += weeksCreated;
|
|
4300
4466
|
notificationWeeksUpdated += weeksUpdated;
|
|
4467
|
+
notificationLoggedEventsCleanedUp += loggedEventsCleanedUp;
|
|
4301
4468
|
});
|
|
4302
4469
|
notificationBoxesUpdated = cleanupSentNotificationsResults.results.length;
|
|
4303
4470
|
notificationBoxesUpdatesCount += notificationBoxesUpdated;
|
|
@@ -4317,7 +4484,126 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
|
|
|
4317
4484
|
notificationTasksDeletedCount: notificationTasksDeletedCount,
|
|
4318
4485
|
notificationsDeleted: notificationsDeleted,
|
|
4319
4486
|
notificationWeeksCreated: notificationWeeksCreated,
|
|
4320
|
-
notificationWeeksUpdated: notificationWeeksUpdated
|
|
4487
|
+
notificationWeeksUpdated: notificationWeeksUpdated,
|
|
4488
|
+
notificationLoggedEventsCleanedUp: notificationLoggedEventsCleanedUp
|
|
4489
|
+
};
|
|
4490
|
+
return [
|
|
4491
|
+
2,
|
|
4492
|
+
result
|
|
4493
|
+
];
|
|
4494
|
+
}
|
|
4495
|
+
});
|
|
4496
|
+
})();
|
|
4497
|
+
}
|
|
4498
|
+
];
|
|
4499
|
+
});
|
|
4500
|
+
})();
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4503
|
+
/**
|
|
4504
|
+
* Factory for the `cleanupOldNotificationLoggedEventDays` action.
|
|
4505
|
+
*
|
|
4506
|
+
* Queries the {@link NotificationLoggedEventDayFirestoreCollectionGroup} for day documents whose
|
|
4507
|
+
* ISO day string ID is older than `now - retentionDays`, then deletes each old day's wrapper doc
|
|
4508
|
+
* and all of its nested page documents (the paged `_index` plus every page).
|
|
4509
|
+
*
|
|
4510
|
+
* For each old day, all docs in the day's paged subcollection are deleted before the wrapper doc
|
|
4511
|
+
* itself, so a partial failure leaves the index pointing at zero pages rather than orphaned ones.
|
|
4512
|
+
*
|
|
4513
|
+
* @param context - the notification server actions context with paged-items collection access
|
|
4514
|
+
* @returns a transform-and-validate function that purges old logged-event days and returns aggregate counts
|
|
4515
|
+
*/ function cleanupOldNotificationLoggedEventDaysFactory(context) {
|
|
4516
|
+
var firestoreContext = context.firestoreContext, firebaseServerActionTransformFunctionFactory = context.firebaseServerActionTransformFunctionFactory, notificationLoggedEventDayCollectionGroup = context.notificationLoggedEventDayCollectionGroup, notificationLoggedEventDayPagedItemsCollectionFactory = context.notificationLoggedEventDayPagedItemsCollectionFactory;
|
|
4517
|
+
function deleteOldLoggedEventDay(dayDocument) {
|
|
4518
|
+
return _async_to_generator$d(function() {
|
|
4519
|
+
var pagesCollection, allPageDocs;
|
|
4520
|
+
return _ts_generator$d(this, function(_state) {
|
|
4521
|
+
switch(_state.label){
|
|
4522
|
+
case 0:
|
|
4523
|
+
pagesCollection = notificationLoggedEventDayPagedItemsCollectionFactory(dayDocument);
|
|
4524
|
+
return [
|
|
4525
|
+
4,
|
|
4526
|
+
pagesCollection.queryDocument().getDocs()
|
|
4527
|
+
];
|
|
4528
|
+
case 1:
|
|
4529
|
+
allPageDocs = _state.sent();
|
|
4530
|
+
return [
|
|
4531
|
+
2,
|
|
4532
|
+
firestoreContext.runTransaction(function(transaction) {
|
|
4533
|
+
return _async_to_generator$d(function() {
|
|
4534
|
+
var pageTxAccessor, dayTxAccessor;
|
|
4535
|
+
return _ts_generator$d(this, function(_state) {
|
|
4536
|
+
switch(_state.label){
|
|
4537
|
+
case 0:
|
|
4538
|
+
pageTxAccessor = pagesCollection.documentAccessorForTransaction(transaction);
|
|
4539
|
+
dayTxAccessor = notificationLoggedEventDayCollectionGroup.documentAccessorForTransaction(transaction);
|
|
4540
|
+
// Delete every page (numbered pages first; the `_index` is included in the same batch).
|
|
4541
|
+
return [
|
|
4542
|
+
4,
|
|
4543
|
+
Promise.all(allPageDocs.map(function(pageDoc) {
|
|
4544
|
+
return pageTxAccessor.loadDocumentFrom(pageDoc).accessor.delete();
|
|
4545
|
+
}))
|
|
4546
|
+
];
|
|
4547
|
+
case 1:
|
|
4548
|
+
_state.sent();
|
|
4549
|
+
// Delete the day wrapper itself last.
|
|
4550
|
+
return [
|
|
4551
|
+
4,
|
|
4552
|
+
dayTxAccessor.loadDocumentFrom(dayDocument).accessor.delete()
|
|
4553
|
+
];
|
|
4554
|
+
case 2:
|
|
4555
|
+
_state.sent();
|
|
4556
|
+
return [
|
|
4557
|
+
2,
|
|
4558
|
+
{
|
|
4559
|
+
pageDocsDeleted: allPageDocs.length
|
|
4560
|
+
}
|
|
4561
|
+
];
|
|
4562
|
+
}
|
|
4563
|
+
});
|
|
4564
|
+
})();
|
|
4565
|
+
})
|
|
4566
|
+
];
|
|
4567
|
+
}
|
|
4568
|
+
});
|
|
4569
|
+
})();
|
|
4570
|
+
}
|
|
4571
|
+
return firebaseServerActionTransformFunctionFactory(cleanupOldNotificationLoggedEventDaysParamsType, function(params) {
|
|
4572
|
+
return _async_to_generator$d(function() {
|
|
4573
|
+
return _ts_generator$d(this, function(_state) {
|
|
4574
|
+
return [
|
|
4575
|
+
2,
|
|
4576
|
+
function() {
|
|
4577
|
+
return _async_to_generator$d(function() {
|
|
4578
|
+
var now, oldDaysQuery, oldDayDocuments, daysDeleted, pagesDeleted, deleteResults, result;
|
|
4579
|
+
return _ts_generator$d(this, function(_state) {
|
|
4580
|
+
switch(_state.label){
|
|
4581
|
+
case 0:
|
|
4582
|
+
now = new Date();
|
|
4583
|
+
oldDaysQuery = notificationLoggedEventDayCollectionGroup.queryDocument(notificationLoggedEventDaysOlderThanQuery(params.retentionDays, now));
|
|
4584
|
+
return [
|
|
4585
|
+
4,
|
|
4586
|
+
oldDaysQuery.getDocs()
|
|
4587
|
+
];
|
|
4588
|
+
case 1:
|
|
4589
|
+
oldDayDocuments = _state.sent();
|
|
4590
|
+
daysDeleted = 0;
|
|
4591
|
+
pagesDeleted = 0;
|
|
4592
|
+
return [
|
|
4593
|
+
4,
|
|
4594
|
+
performAsyncTasks(oldDayDocuments, deleteOldLoggedEventDay, {
|
|
4595
|
+
maxParallelTasks: 10
|
|
4596
|
+
})
|
|
4597
|
+
];
|
|
4598
|
+
case 2:
|
|
4599
|
+
deleteResults = _state.sent();
|
|
4600
|
+
deleteResults.results.forEach(function(entry) {
|
|
4601
|
+
daysDeleted += 1;
|
|
4602
|
+
pagesDeleted += entry[1].pageDocsDeleted;
|
|
4603
|
+
});
|
|
4604
|
+
result = {
|
|
4605
|
+
daysDeleted: daysDeleted,
|
|
4606
|
+
pagesDeleted: pagesDeleted
|
|
4321
4607
|
};
|
|
4322
4608
|
return [
|
|
4323
4609
|
2,
|
|
@@ -12560,4 +12846,4 @@ function _ts_generator(thisArg, body) {
|
|
|
12560
12846
|
};
|
|
12561
12847
|
}
|
|
12562
12848
|
|
|
12563
|
-
export { AbstractAppNotificationModule, BASE_NOTIFICATION_SERVER_ACTION_CONTEXT_TOKEN, BASE_STORAGE_FILE_SERVER_ACTION_CONTEXT_TOKEN, DEFAULT_DOWNLOAD_MULTIPLE_STORAGE_FILES_MAX_PARALLEL_TASKS, GlobalNotificationModule, KNOWN_BUT_UNCONFIGURED_NOTIFICATION_TEMPLATE_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, KNOWN_BUT_UNCONFIGURED_NOTIFICATION_TEMPLATE_TYPE_HOURS_DELAY, MAILGUN_NOTIFICATION_EMAIL_SEND_SERVICE_DEFAULT_MAX_BATCH_SIZE_PER_REQUEST, MAKE_TEMPLATE_FOR_NOTIFICATION_RELATED_MODEL_INITIALIZATION_FUNCTION_DELETE_RESPONSE, MAKE_TEMPLATE_FOR_STORAGEFILE_RELATED_MODEL_INITIALIZATION_FUNCTION_DELETE_RESPONSE, MutableNotificationExpediteService, NOTIFICATION_BOX_NOT_INITIALIZED_DELAY_MINUTES, NOTIFICATION_INIT_SERVER_ACTIONS_CONTEXT_CONFIG_TOKEN, NOTIFICATION_MAX_SEND_ATTEMPTS, NOTIFICATION_SERVER_ACTION_CONTEXT_TOKEN, NOTIFICATION_TASK_MINIMUM_SET_AT_THROTTLE_TIME_MINUTES, NOTIFICATION_TASK_TYPE_FAILURE_DELAY_HOURS, NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS, NOTIFICATION_TASK_TYPE_MAX_SEND_ATTEMPTS, NOTIFICATION_TEMPLATE_SERVICE_CONFIGS_ARRAY_TOKEN, NOTIFICATION_TEMPLATE_SERVICE_DEFAULTS_OVERRIDE_TOKEN, NotificationExpediteService, NotificationInitServerActions, NotificationSendService, NotificationServerActions, NotificationTaskService, NotificationTaskSubTaskMissingRequiredDataTermination, NotificationTemplateService, SEND_QUEUE_NOTIFICATIONS_TASK_EXCESS_THRESHOLD, STORAGE_FILE_INIT_SERVER_ACTIONS_CONTEXT_CONFIG_TOKEN, STORAGE_FILE_SERVER_ACTION_CONTEXT_TOKEN, StorageFileInitServerActions, StorageFileInitializeFromUploadService, StorageFileServerActions, UNKNOWN_NOTIFICATION_TASK_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, UNKNOWN_NOTIFICATION_TASK_TYPE_HOURS_DELAY, UNKNOWN_NOTIFICATION_TEMPLATE_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, UNKNOWN_NOTIFICATION_TEMPLATE_TYPE_HOURS_DELAY, _initializeStorageFileFromUploadFileFactory, _processStorageFileInTransactionFactory, _syncStorageFileWithGroupsInTransactionFactory, allStorageFileGroupStorageFileProcessingPurposeSubtaskProcessors, appNotificationModuleMetadata, appStorageFileModuleMetadata, cleanupSentNotificationsFactory, createNotificationBoxFactory, createNotificationBoxInTransactionFactory, createNotificationIdRequiredError, createNotificationSummaryFactory, createNotificationUserFactory, createOrRunUniqueNotificationDocument, createStorageFileFactory, createStorageFileGroupFactory, createStorageFileGroupInTransactionFactory, createStorageFileGroupInputError, deleteAllQueuedStorageFilesFactory, deleteStorageFileFactory, downloadMultipleStorageFilesFactory, downloadStorageFileFactory, expandNotificationRecipients, exportMutableNotificationExpediteService, firestoreNotificationSummarySendService, ignoreSendNotificationTextSendService, initializeAllApplicableNotificationBoxesFactory, initializeAllApplicableNotificationSummariesFactory, initializeAllApplicableStorageFileGroupsFactory, initializeAllStorageFilesFromUploadsFactory, initializeNotificationBoxFactory, initializeNotificationBoxInTransactionFactory, initializeNotificationModelInTransaction, initializeNotificationSummaryFactory, initializeNotificationSummaryInTransactionFactory, initializeStorageFileFromUploadFactory, initializeStorageFileGroupFactory, initializeStorageFileGroupInTransactionFactory, initializeStorageFileModelInTransaction, mailgunNotificationEmailSendService, makeNewNotificationSummaryTemplate, markStorageFileForDeleteTemplate, notificationBoxDoesNotExist, notificationBoxExclusionTargetInvalidError, notificationBoxExistsForModelError, notificationBoxRecipientDoesNotExistsError, notificationBoxUnregistredModelTypeInitializationError, notificationExpediteServiceInstance, notificationInitServerActions, notificationInitServerActionsFactory, notificationModelAlreadyInitializedError, notificationServerActions, notificationServerActionsContextFactory, notificationServerActionsFactory, notificationTaskService, notificationTaskSubTaskMissingRequiredDataTermination, notificationTaskSubtaskNotificationTaskHandlerFactory, notificationTemplateServiceInstance, notificationUserBlockedFromBeingAddedToRecipientsError, notificationUserInvalidUidForCreateError, notificationUserLockedConfigFromBeingUpdatedError, processAllQueuedStorageFilesFactory, processStorageFileFactory, provideMutableNotificationExpediteService, queryAndFlagStorageFilesForDelete, regenerateAllFlaggedStorageFileGroupsContentFactory, regenerateStorageFileGroupContentFactory, resyncAllNotificationUsersFactory, resyncNotificationUserFactory, sendNotificationFactory, sendQueuedNotificationsFactory, storageFileAlreadyProcessedError, storageFileCannotBeDeletedYetError, storageFileGroupQueuedForInitializationError, storageFileGroupZipStorageFileProcessingPurposeSubtaskProcessor, storageFileInitServerActions, storageFileInitServerActionsFactory, storageFileInitializeFromUploadService, storageFileInitializeFromUploadServiceInitializerResultPermanentFailure, storageFileModelAlreadyInitializedError, storageFileNotFlaggedForDeletionError, storageFileNotFlaggedForGroupsSyncError, storageFileProcessingNotAllowedForInvalidStateError, storageFileProcessingNotAvailableForTypeError, storageFileProcessingNotQueuedForProcessingError, storageFileProcessingNotificationTaskHandler, storageFileProcessingNotificationTaskHandlerDefaultCleanup, storageFileServerActions, storageFileServerActionsContextFactory, storageFileServerActionsFactory, syncAllFlaggedStorageFilesWithGroupsFactory, syncStorageFileWithGroupsFactory, updateNotificationBoxFactory, updateNotificationBoxRecipientExclusionInTransactionFactory, updateNotificationBoxRecipientFactory, updateNotificationBoxRecipientInTransactionFactory, updateNotificationSummaryFactory, updateNotificationUserFactory, updateNotificationUserNotificationBoxRecipientConfig, updateStorageFileFactory, updateStorageFileGroupFactory, uploadedFileDoesNotExistError, uploadedFileInitializationDiscardedError, uploadedFileInitializationFailedError, uploadedFileIsNotAllowedToBeInitializedError };
|
|
12849
|
+
export { AbstractAppNotificationModule, BASE_NOTIFICATION_SERVER_ACTION_CONTEXT_TOKEN, BASE_STORAGE_FILE_SERVER_ACTION_CONTEXT_TOKEN, DEFAULT_DOWNLOAD_MULTIPLE_STORAGE_FILES_MAX_PARALLEL_TASKS, GlobalNotificationModule, KNOWN_BUT_UNCONFIGURED_NOTIFICATION_TEMPLATE_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, KNOWN_BUT_UNCONFIGURED_NOTIFICATION_TEMPLATE_TYPE_HOURS_DELAY, MAILGUN_NOTIFICATION_EMAIL_SEND_SERVICE_DEFAULT_MAX_BATCH_SIZE_PER_REQUEST, MAKE_TEMPLATE_FOR_NOTIFICATION_RELATED_MODEL_INITIALIZATION_FUNCTION_DELETE_RESPONSE, MAKE_TEMPLATE_FOR_STORAGEFILE_RELATED_MODEL_INITIALIZATION_FUNCTION_DELETE_RESPONSE, MutableNotificationExpediteService, NOTIFICATION_BOX_NOT_INITIALIZED_DELAY_MINUTES, NOTIFICATION_INIT_SERVER_ACTIONS_CONTEXT_CONFIG_TOKEN, NOTIFICATION_MAX_SEND_ATTEMPTS, NOTIFICATION_SERVER_ACTION_CONTEXT_TOKEN, NOTIFICATION_TASK_MINIMUM_SET_AT_THROTTLE_TIME_MINUTES, NOTIFICATION_TASK_TYPE_FAILURE_DELAY_HOURS, NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS, NOTIFICATION_TASK_TYPE_MAX_SEND_ATTEMPTS, NOTIFICATION_TEMPLATE_SERVICE_CONFIGS_ARRAY_TOKEN, NOTIFICATION_TEMPLATE_SERVICE_DEFAULTS_OVERRIDE_TOKEN, NotificationExpediteService, NotificationInitServerActions, NotificationSendService, NotificationServerActions, NotificationTaskService, NotificationTaskSubTaskMissingRequiredDataTermination, NotificationTemplateService, SEND_QUEUE_NOTIFICATIONS_TASK_EXCESS_THRESHOLD, STORAGE_FILE_INIT_SERVER_ACTIONS_CONTEXT_CONFIG_TOKEN, STORAGE_FILE_SERVER_ACTION_CONTEXT_TOKEN, StorageFileInitServerActions, StorageFileInitializeFromUploadService, StorageFileServerActions, UNKNOWN_NOTIFICATION_TASK_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, UNKNOWN_NOTIFICATION_TASK_TYPE_HOURS_DELAY, UNKNOWN_NOTIFICATION_TEMPLATE_TYPE_DELETE_AFTER_RETRY_ATTEMPTS, UNKNOWN_NOTIFICATION_TEMPLATE_TYPE_HOURS_DELAY, _initializeStorageFileFromUploadFileFactory, _processStorageFileInTransactionFactory, _syncStorageFileWithGroupsInTransactionFactory, allStorageFileGroupStorageFileProcessingPurposeSubtaskProcessors, appNotificationModuleMetadata, appStorageFileModuleMetadata, cleanupOldNotificationLoggedEventDaysFactory, cleanupSentNotificationsFactory, createNotificationBoxFactory, createNotificationBoxInTransactionFactory, createNotificationIdRequiredError, createNotificationSummaryFactory, createNotificationUserFactory, createOrRunUniqueNotificationDocument, createStorageFileFactory, createStorageFileGroupFactory, createStorageFileGroupInTransactionFactory, createStorageFileGroupInputError, deleteAllQueuedStorageFilesFactory, deleteStorageFileFactory, downloadMultipleStorageFilesFactory, downloadStorageFileFactory, expandNotificationRecipients, exportMutableNotificationExpediteService, firestoreNotificationSummarySendService, ignoreSendNotificationTextSendService, initializeAllApplicableNotificationBoxesFactory, initializeAllApplicableNotificationSummariesFactory, initializeAllApplicableStorageFileGroupsFactory, initializeAllStorageFilesFromUploadsFactory, initializeNotificationBoxFactory, initializeNotificationBoxInTransactionFactory, initializeNotificationModelInTransaction, initializeNotificationSummaryFactory, initializeNotificationSummaryInTransactionFactory, initializeStorageFileFromUploadFactory, initializeStorageFileGroupFactory, initializeStorageFileGroupInTransactionFactory, initializeStorageFileModelInTransaction, mailgunNotificationEmailSendService, makeNewNotificationSummaryTemplate, markStorageFileForDeleteTemplate, notificationBoxDoesNotExist, notificationBoxExclusionTargetInvalidError, notificationBoxExistsForModelError, notificationBoxRecipientDoesNotExistsError, notificationBoxUnregistredModelTypeInitializationError, notificationExpediteServiceInstance, notificationInitServerActions, notificationInitServerActionsFactory, notificationModelAlreadyInitializedError, notificationServerActions, notificationServerActionsContextFactory, notificationServerActionsFactory, notificationTaskService, notificationTaskSubTaskMissingRequiredDataTermination, notificationTaskSubtaskNotificationTaskHandlerFactory, notificationTemplateServiceInstance, notificationUserBlockedFromBeingAddedToRecipientsError, notificationUserInvalidUidForCreateError, notificationUserLockedConfigFromBeingUpdatedError, processAllQueuedStorageFilesFactory, processStorageFileFactory, provideMutableNotificationExpediteService, queryAndFlagStorageFilesForDelete, regenerateAllFlaggedStorageFileGroupsContentFactory, regenerateStorageFileGroupContentFactory, resyncAllNotificationUsersFactory, resyncNotificationUserFactory, sendNotificationFactory, sendQueuedNotificationsFactory, storageFileAlreadyProcessedError, storageFileCannotBeDeletedYetError, storageFileGroupQueuedForInitializationError, storageFileGroupZipStorageFileProcessingPurposeSubtaskProcessor, storageFileInitServerActions, storageFileInitServerActionsFactory, storageFileInitializeFromUploadService, storageFileInitializeFromUploadServiceInitializerResultPermanentFailure, storageFileModelAlreadyInitializedError, storageFileNotFlaggedForDeletionError, storageFileNotFlaggedForGroupsSyncError, storageFileProcessingNotAllowedForInvalidStateError, storageFileProcessingNotAvailableForTypeError, storageFileProcessingNotQueuedForProcessingError, storageFileProcessingNotificationTaskHandler, storageFileProcessingNotificationTaskHandlerDefaultCleanup, storageFileServerActions, storageFileServerActionsContextFactory, storageFileServerActionsFactory, syncAllFlaggedStorageFilesWithGroupsFactory, syncStorageFileWithGroupsFactory, updateNotificationBoxFactory, updateNotificationBoxRecipientExclusionInTransactionFactory, updateNotificationBoxRecipientFactory, updateNotificationBoxRecipientInTransactionFactory, updateNotificationSummaryFactory, updateNotificationUserFactory, updateNotificationUserNotificationBoxRecipientConfig, updateStorageFileFactory, updateStorageFileGroupFactory, uploadedFileDoesNotExistError, uploadedFileInitializationDiscardedError, uploadedFileInitializationFailedError, uploadedFileIsNotAllowedToBeInitializedError };
|