@dereekb/firebase-server 13.11.14 → 13.11.15
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 +229 -199
- package/index.esm.js +230 -200
- package/mailgun/package.json +9 -9
- package/model/index.cjs.js +259 -270
- package/model/index.esm.js +259 -270
- package/model/package.json +9 -9
- package/model/src/lib/mailgun/notification.send.service.mailgun.d.ts +3 -3
- package/model/src/lib/notification/notification.action.server.d.ts +34 -34
- package/model/src/lib/notification/notification.action.server.init.d.ts +17 -17
- package/model/src/lib/notification/notification.config.service.d.ts +7 -7
- package/model/src/lib/notification/notification.create.run.d.ts +3 -3
- package/model/src/lib/notification/notification.error.d.ts +14 -14
- package/model/src/lib/notification/notification.expedite.service.d.ts +7 -7
- package/model/src/lib/notification/notification.module.d.ts +13 -13
- package/model/src/lib/notification/notification.send.service.notificationsummary.d.ts +2 -2
- package/model/src/lib/notification/notification.send.service.text.d.ts +1 -1
- package/model/src/lib/notification/notification.task.service.handler.d.ts +2 -2
- package/model/src/lib/notification/notification.task.service.util.d.ts +3 -3
- package/model/src/lib/notification/notification.task.subtask.handler.d.ts +3 -3
- package/model/src/lib/notification/notification.util.d.ts +8 -8
- package/model/src/lib/storagefile/storagefile.action.server.d.ts +43 -44
- package/model/src/lib/storagefile/storagefile.action.server.init.d.ts +11 -11
- package/model/src/lib/storagefile/storagefile.error.d.ts +15 -15
- package/model/src/lib/storagefile/storagefile.module.d.ts +10 -10
- package/model/src/lib/storagefile/storagefile.task.service.handler.d.ts +6 -6
- package/model/src/lib/storagefile/storagefile.upload.service.initializer.d.ts +5 -5
- package/model/src/lib/storagefile/storagefile.util.d.ts +2 -2
- package/oidc/index.cjs.js +219 -219
- package/oidc/index.esm.js +219 -219
- package/oidc/package.json +10 -10
- package/oidc/src/lib/controller/oidc.interaction.controller.d.ts +44 -25
- package/oidc/src/lib/controller/oidc.provider.controller.d.ts +1 -1
- package/oidc/src/lib/controller/oidc.wellknown.controller.d.ts +3 -3
- package/oidc/src/lib/middleware/oauth-cors.module.d.ts +1 -1
- package/oidc/src/lib/model/jwks/jwks.d.ts +6 -6
- package/oidc/src/lib/model/jwks/jwks.query.d.ts +5 -5
- package/oidc/src/lib/model/oidc/oidcmodel.action.server.d.ts +12 -12
- package/oidc/src/lib/model/oidc/oidcmodel.module.d.ts +5 -5
- package/oidc/src/lib/oidc.config.d.ts +1 -1
- package/oidc/src/lib/oidc.module.d.ts +8 -8
- package/oidc/src/lib/service/oidc.account.service.d.ts +4 -4
- package/oidc/src/lib/service/oidc.adapter.service.d.ts +4 -4
- package/oidc/src/lib/service/oidc.client.service.d.ts +3 -3
- package/oidc/src/lib/service/oidc.config.service.d.ts +1 -1
- package/oidc/src/lib/service/oidc.encryption.service.d.ts +4 -4
- package/oidc/src/lib/service/oidc.interaction.service.d.ts +14 -14
- package/oidc/src/lib/service/oidc.jwks.service.d.ts +6 -6
- package/oidc/src/lib/service/oidc.service.d.ts +5 -5
- package/package.json +10 -10
- package/src/lib/auth/auth.service.d.ts +8 -8
- package/src/lib/auth/auth.util.d.ts +1 -1
- package/src/lib/env/env.config.d.ts +5 -4
- package/src/lib/firestore/driver.accessor.batch.d.ts +2 -1
- package/src/lib/firestore/driver.accessor.d.ts +1 -1
- package/src/lib/firestore/driver.accessor.default.d.ts +2 -1
- package/src/lib/firestore/driver.accessor.transaction.d.ts +2 -1
- package/src/lib/firestore/snapshot/snapshot.field.encrypt.d.ts +10 -6
- package/src/lib/function/type.d.ts +4 -4
- package/src/lib/nest/analytics/analytics.module.d.ts +6 -5
- package/src/lib/nest/app.d.ts +4 -4
- package/src/lib/nest/app.module.d.ts +3 -2
- package/src/lib/nest/auth/auth.module.d.ts +4 -3
- package/src/lib/nest/controller/model/model.api.controller.d.ts +1 -0
- package/src/lib/nest/controller/model/model.api.get.service.d.ts +1 -1
- package/src/lib/nest/controller/model/model.api.module.d.ts +4 -3
- package/src/lib/nest/development/development.function.d.ts +1 -1
- package/src/lib/nest/development/development.schedule.function.error.d.ts +2 -2
- package/src/lib/nest/env/env.util.d.ts +2 -2
- package/src/lib/nest/firestore/firestore.module.d.ts +16 -15
- package/src/lib/nest/function/call.d.ts +6 -6
- package/src/lib/nest/function/context.d.ts +7 -6
- package/src/lib/nest/function/v2/blocking.d.ts +8 -6
- package/src/lib/nest/function/v2/call.d.ts +7 -5
- package/src/lib/nest/function/v2/event.d.ts +3 -2
- package/src/lib/nest/function/v2/schedule.d.ts +3 -2
- package/src/lib/nest/function/v2/taskqueue.d.ts +2 -1
- package/src/lib/nest/model/analytics.emit.d.ts +5 -5
- package/src/lib/nest/model/api.details.d.ts +4 -4
- package/src/lib/nest/model/query.model.function.d.ts +3 -3
- package/src/lib/nest/nest.provider.d.ts +7 -7
- package/src/lib/nest/storage/storage.module.d.ts +6 -5
- package/src/lib/storage/driver.accessor.d.ts +10 -10
- package/test/index.cjs.js +48 -57
- package/test/index.esm.js +48 -57
- package/test/package.json +11 -11
- package/test/src/lib/firebase/firebase.admin.auth.d.ts +18 -18
- package/test/src/lib/firebase/firebase.admin.collection.d.ts +7 -7
- package/test/src/lib/firebase/firebase.admin.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.function.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.nest.function.callable.context.d.ts +1 -1
- package/test/src/lib/firebase/firebase.admin.nest.function.cloud.context.d.ts +3 -3
- package/test/src/lib/firebase/firebase.d.ts +6 -5
- package/test/src/lib/firebase/firebase.function.d.ts +31 -31
- package/test/src/lib/firestore/firestore.d.ts +2 -2
- package/test/src/lib/oidc/oidc.test.fixture.d.ts +1 -1
- package/test/src/lib/oidc/oidc.test.flow.d.ts +1 -1
- package/test/src/lib/storage/storage.d.ts +2 -2
- package/zoho/index.cjs.js +2 -2
- package/zoho/index.esm.js +2 -2
- package/zoho/package.json +9 -9
- package/zoho/src/lib/zoho.accounts.firebase.d.ts +1 -1
- package/zoho/src/lib/zoho.accounts.firebase.system.d.ts +1 -1
package/model/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/model",
|
|
3
|
-
"version": "13.11.
|
|
3
|
+
"version": "13.11.15",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.11.
|
|
6
|
-
"@dereekb/date": "13.11.
|
|
7
|
-
"@dereekb/firebase": "13.11.
|
|
8
|
-
"@dereekb/firebase-server": "13.11.
|
|
9
|
-
"@dereekb/model": "13.11.
|
|
10
|
-
"@dereekb/nestjs": "13.11.
|
|
11
|
-
"@dereekb/rxjs": "13.11.
|
|
12
|
-
"@dereekb/util": "13.11.
|
|
5
|
+
"@dereekb/analytics": "13.11.15",
|
|
6
|
+
"@dereekb/date": "13.11.15",
|
|
7
|
+
"@dereekb/firebase": "13.11.15",
|
|
8
|
+
"@dereekb/firebase-server": "13.11.15",
|
|
9
|
+
"@dereekb/model": "13.11.15",
|
|
10
|
+
"@dereekb/nestjs": "13.11.15",
|
|
11
|
+
"@dereekb/rxjs": "13.11.15",
|
|
12
|
+
"@dereekb/util": "13.11.15",
|
|
13
13
|
"@nestjs/common": "^11.1.19",
|
|
14
14
|
"@nestjs/config": "^4.0.4",
|
|
15
15
|
"archiver": "^7.0.1",
|
|
@@ -42,7 +42,7 @@ export interface MailgunNotificationEmailSendServiceConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
readonly messageBuilders: Record<NotificationSendMessageTemplateName, MailgunNotificationEmailSendServiceTemplateBuilder>;
|
|
44
44
|
}
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const DEFAULT_MAILGUN_NOTIFICATION_EMAIL_SEND_SERVICE_MAX_BATCH_SIZE_PER_REQUEST = 50;
|
|
46
46
|
/**
|
|
47
47
|
* Function that converts the input into zero or more MailgunTemplateEmailRequests.
|
|
48
48
|
*/
|
|
@@ -58,8 +58,8 @@ export type MailgunNotificationEmailSendService = NotificationEmailSendService;
|
|
|
58
58
|
* converts each batch to a {@link MailgunTemplateEmailRequest} using the configured template builders,
|
|
59
59
|
* and dispatches them through the Mailgun API.
|
|
60
60
|
*
|
|
61
|
-
* @param config -
|
|
62
|
-
* @returns
|
|
61
|
+
* @param config - Service configuration including the Mailgun service, template builders, and batch size.
|
|
62
|
+
* @returns A {@link NotificationEmailSendService} that batches and sends emails through Mailgun.
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* ```ts
|
|
@@ -64,8 +64,8 @@ export declare abstract class NotificationServerActions {
|
|
|
64
64
|
* Creates a concrete {@link NotificationServerActions} implementation by wiring each action
|
|
65
65
|
* to its factory function using the provided context.
|
|
66
66
|
*
|
|
67
|
-
* @param context -
|
|
68
|
-
* @returns
|
|
67
|
+
* @param context - The fully assembled notification server actions context.
|
|
68
|
+
* @returns A fully wired {@link NotificationServerActions} instance.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -81,8 +81,8 @@ export declare function notificationServerActions(context: NotificationServerAct
|
|
|
81
81
|
* Validates the UID exists in Firebase Auth, then creates a new {@link NotificationUser} document
|
|
82
82
|
* with empty default and global configs. Throws if the UID is not found in Auth.
|
|
83
83
|
*
|
|
84
|
-
* @param context -
|
|
85
|
-
* @returns
|
|
84
|
+
* @param context - The notification server actions context with auth and collection access.
|
|
85
|
+
* @returns A transform-and-validate function that creates a new notification user document.
|
|
86
86
|
*/
|
|
87
87
|
export declare function createNotificationUserFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<CreateNotificationUserParams, () => Promise<NotificationUserDocument>, object, unknown>;
|
|
88
88
|
/**
|
|
@@ -92,8 +92,8 @@ export declare function createNotificationUserFactory(context: NotificationServe
|
|
|
92
92
|
* box configs (`bc`). When the global config changes, iterates all box configs to propagate
|
|
93
93
|
* effective recipient changes and marks affected entries for sync.
|
|
94
94
|
*
|
|
95
|
-
* @param context -
|
|
96
|
-
* @returns
|
|
95
|
+
* @param context - The notification server actions context with Firestore and collection access.
|
|
96
|
+
* @returns A transform-and-validate function that updates an existing notification user document.
|
|
97
97
|
*/
|
|
98
98
|
export declare function updateNotificationUserFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<UpdateNotificationUserParams, (notificationUserDocument: NotificationUserDocument) => Promise<NotificationUserDocument>, object, unknown>;
|
|
99
99
|
/**
|
|
@@ -104,8 +104,8 @@ export declare function updateNotificationUserFactory(context: NotificationServe
|
|
|
104
104
|
* and merging the user's preferences back into the box's recipient list. Handles removed entries
|
|
105
105
|
* and cleans up stale box references.
|
|
106
106
|
*
|
|
107
|
-
* @param context -
|
|
108
|
-
* @returns
|
|
107
|
+
* @param context - The notification server actions context with Firestore and collection access.
|
|
108
|
+
* @returns A transform-and-validate function that resyncs a notification user's box configurations.
|
|
109
109
|
*/
|
|
110
110
|
export declare function resyncNotificationUserFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<import("@dereekb/firebase").TargetModelParams, (notificationUserDocument: NotificationUserDocument) => Promise<ResyncNotificationUserResult>, object, unknown>;
|
|
111
111
|
/**
|
|
@@ -115,8 +115,8 @@ export declare function resyncNotificationUserFactory(context: NotificationServe
|
|
|
115
115
|
* for entries with `ns=true`, then calling the resync logic for each in parallel
|
|
116
116
|
* (up to 5 concurrent tasks). Loops until no more flagged users are found.
|
|
117
117
|
*
|
|
118
|
-
* @param context -
|
|
119
|
-
* @returns
|
|
118
|
+
* @param context - The notification server actions context with collection access.
|
|
119
|
+
* @returns An async function that resyncs all flagged notification users and returns aggregate results.
|
|
120
120
|
*/
|
|
121
121
|
export declare function resyncAllNotificationUsersFactory(context: NotificationServerActionsContext): () => Promise<ResyncAllNotificationUsersResult>;
|
|
122
122
|
/**
|
|
@@ -125,8 +125,8 @@ export declare function resyncAllNotificationUsersFactory(context: NotificationS
|
|
|
125
125
|
* Creates a new {@link NotificationSummary} document for a model, generating the summary ID
|
|
126
126
|
* from the model key and initializing it with a blank template.
|
|
127
127
|
*
|
|
128
|
-
* @param context -
|
|
129
|
-
* @returns
|
|
128
|
+
* @param context - The notification server actions context with collection access.
|
|
129
|
+
* @returns A transform-and-validate function that creates a new notification summary document.
|
|
130
130
|
*/
|
|
131
131
|
export declare function createNotificationSummaryFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<CreateNotificationSummaryParams, () => Promise<NotificationSummaryDocument>, object, unknown>;
|
|
132
132
|
/**
|
|
@@ -135,8 +135,8 @@ export declare function createNotificationSummaryFactory(context: NotificationSe
|
|
|
135
135
|
* Updates an existing {@link NotificationSummary} document's owner or setup flag.
|
|
136
136
|
* Runs within a Firestore transaction to ensure consistency.
|
|
137
137
|
*
|
|
138
|
-
* @param context -
|
|
139
|
-
* @returns
|
|
138
|
+
* @param context - The notification server actions context.
|
|
139
|
+
* @returns A transform-and-validate function that updates an existing notification summary document.
|
|
140
140
|
*/
|
|
141
141
|
export declare function updateNotificationSummaryFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<UpdateNotificationSummaryParams, (notificationSummaryDocument: NotificationSummaryDocument) => Promise<NotificationSummaryDocument>, object, unknown>;
|
|
142
142
|
/**
|
|
@@ -160,8 +160,8 @@ export interface CreateNotificationBoxInTransactionInput extends NotificationBox
|
|
|
160
160
|
* Checks for existing boxes and throws if one already exists for the model.
|
|
161
161
|
* Also syncs initial recipients with their corresponding {@link NotificationUser} documents.
|
|
162
162
|
*
|
|
163
|
-
* @param context -
|
|
164
|
-
* @returns
|
|
163
|
+
* @param context - The base notification server actions context with collection access.
|
|
164
|
+
* @returns An async function that creates a notification box within a transaction and returns the document and template.
|
|
165
165
|
*/
|
|
166
166
|
export declare function createNotificationBoxInTransactionFactory(context: BaseNotificationServerActionsContext): (params: CreateNotificationBoxInTransactionInput, transaction: Transaction) => Promise<{
|
|
167
167
|
notificationBoxTemplate: NotificationBox;
|
|
@@ -173,8 +173,8 @@ export declare function createNotificationBoxInTransactionFactory(context: BaseN
|
|
|
173
173
|
* Wraps {@link createNotificationBoxInTransactionFactory} in a Firestore transaction
|
|
174
174
|
* and follows the transform-and-validate pattern.
|
|
175
175
|
*
|
|
176
|
-
* @param context -
|
|
177
|
-
* @returns
|
|
176
|
+
* @param context - The notification server actions context with Firestore and collection access.
|
|
177
|
+
* @returns A transform-and-validate function that creates a new notification box document.
|
|
178
178
|
*/
|
|
179
179
|
export declare function createNotificationBoxFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<CreateNotificationBoxParams, () => Promise<NotificationBoxDocument>, object, unknown>;
|
|
180
180
|
/**
|
|
@@ -183,8 +183,8 @@ export declare function createNotificationBoxFactory(context: NotificationServer
|
|
|
183
183
|
* Currently a no-op placeholder that returns the document unchanged.
|
|
184
184
|
* Reserved for future box-level update logic.
|
|
185
185
|
*
|
|
186
|
-
* @param context -
|
|
187
|
-
* @returns
|
|
186
|
+
* @param context - The notification server actions context (destructured for the transform factory)
|
|
187
|
+
* @returns A transform-and-validate function that returns the notification box document unchanged.
|
|
188
188
|
*/
|
|
189
189
|
export declare function updateNotificationBoxFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<import("@dereekb/firebase").TargetModelParams, (notificationBoxDocument: NotificationBoxDocument) => Promise<NotificationBoxDocument>, object, unknown>;
|
|
190
190
|
export interface UpdateNotificationBoxRecipientExclusionInTransactionInput extends NotificationBoxDocumentReferencePair {
|
|
@@ -199,8 +199,8 @@ export interface UpdateNotificationBoxRecipientExclusionInTransactionResult {
|
|
|
199
199
|
* Manages the exclusion list (`x`) on both the box recipient and the corresponding
|
|
200
200
|
* {@link NotificationUser}'s send exclusion array, keeping them in sync.
|
|
201
201
|
*
|
|
202
|
-
* @param context -
|
|
203
|
-
* @returns
|
|
202
|
+
* @param context - The base notification server actions context with collection access.
|
|
203
|
+
* @returns An async function that updates recipient exclusions within a transaction.
|
|
204
204
|
*/
|
|
205
205
|
export declare function updateNotificationBoxRecipientExclusionInTransactionFactory(context: BaseNotificationServerActionsContext): (input: UpdateNotificationBoxRecipientExclusionInTransactionInput, transaction: Transaction) => Promise<Maybe<UpdateNotificationBoxRecipientExclusionInTransactionResult>>;
|
|
206
206
|
export interface UpdateNotificationBoxRecipientInTransactionInput extends NotificationBoxDocumentReferencePair {
|
|
@@ -231,8 +231,8 @@ export interface UpdateNotificationBoxRecipientInTransactionResult {
|
|
|
231
231
|
* Syncs changes with the recipient's {@link NotificationUser} document and manages
|
|
232
232
|
* recipient index assignment via a sorted-values free-index calculator.
|
|
233
233
|
*
|
|
234
|
-
* @param context -
|
|
235
|
-
* @returns
|
|
234
|
+
* @param context - The base notification server actions context with auth and collection access.
|
|
235
|
+
* @returns An async function that updates a recipient on a notification box within a transaction.
|
|
236
236
|
*/
|
|
237
237
|
export declare function updateNotificationBoxRecipientInTransactionFactory(context: BaseNotificationServerActionsContext): (input: UpdateNotificationBoxRecipientInTransactionInput, transaction: Transaction) => Promise<Maybe<UpdateNotificationBoxRecipientInTransactionResult>>;
|
|
238
238
|
/**
|
|
@@ -241,8 +241,8 @@ export declare function updateNotificationBoxRecipientInTransactionFactory(conte
|
|
|
241
241
|
* Wraps the in-transaction recipient update logic, handling both recipient changes
|
|
242
242
|
* and send exclusion updates in a single Firestore transaction.
|
|
243
243
|
*
|
|
244
|
-
* @param context -
|
|
245
|
-
* @returns
|
|
244
|
+
* @param context - The notification server actions context with Firestore and collection access.
|
|
245
|
+
* @returns A transform-and-validate function that updates a recipient on a notification box.
|
|
246
246
|
*/
|
|
247
247
|
export declare function updateNotificationBoxRecipientFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<UpdateNotificationBoxRecipientParams, (notificationBoxDocument: NotificationBoxDocument) => Promise<NotificationBoxDocument>, object, unknown>;
|
|
248
248
|
export declare const UNKNOWN_NOTIFICATION_TEMPLATE_TYPE_HOURS_DELAY = 8;
|
|
@@ -274,8 +274,8 @@ export declare const NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS: number;
|
|
|
274
274
|
* Supports throttling via `sendAt` time, configurable send flags, and task-based
|
|
275
275
|
* async workflows for notifications that require multi-step processing.
|
|
276
276
|
*
|
|
277
|
-
* @param context -
|
|
278
|
-
* @returns
|
|
277
|
+
* @param context - The notification server actions context with template, send, and task services.
|
|
278
|
+
* @returns A transform-and-validate function that processes and sends a notification document.
|
|
279
279
|
*/
|
|
280
280
|
export declare function sendNotificationFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<SendNotificationParams, (inputNotificationDocument: NotificationDocument) => Promise<SendNotificationResult>, object, unknown>;
|
|
281
281
|
/**
|
|
@@ -300,8 +300,8 @@ export interface SendQueuedNotificationsInput {
|
|
|
300
300
|
* Continues processing batches until no more queued notifications are found
|
|
301
301
|
* or the time budget is exhausted.
|
|
302
302
|
*
|
|
303
|
-
* @param context -
|
|
304
|
-
* @returns
|
|
303
|
+
* @param context - The notification server actions context with collection group and send factory access.
|
|
304
|
+
* @returns A transform-and-validate function that processes all queued notifications and returns aggregate results.
|
|
305
305
|
*/
|
|
306
306
|
export declare function sendQueuedNotificationsFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<SendQueuedNotificationsParams, (input?: Maybe<SendQueuedNotificationsInput>) => Promise<SendQueuedNotificationsResult>, object, unknown>;
|
|
307
307
|
/**
|
|
@@ -311,8 +311,8 @@ export declare function sendQueuedNotificationsFactory(context: NotificationServ
|
|
|
311
311
|
* past the retention window) and deletes them in batches. Continues until no more
|
|
312
312
|
* cleanup-eligible notifications are found.
|
|
313
313
|
*
|
|
314
|
-
* @param context -
|
|
315
|
-
* @returns
|
|
314
|
+
* @param context - The notification server actions context with Firestore and collection access.
|
|
315
|
+
* @returns A transform-and-validate function that cleans up sent notification documents and returns aggregate results.
|
|
316
316
|
*/
|
|
317
317
|
export declare function cleanupSentNotificationsFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<CleanupSentNotificationsParams, () => Promise<CleanupSentNotificationsResult>, object, unknown>;
|
|
318
318
|
/**
|
|
@@ -325,7 +325,7 @@ export declare function cleanupSentNotificationsFactory(context: NotificationSer
|
|
|
325
325
|
* For each old day, all docs in the day's paged subcollection are deleted before the wrapper doc
|
|
326
326
|
* itself, so a partial failure leaves the index pointing at zero pages rather than orphaned ones.
|
|
327
327
|
*
|
|
328
|
-
* @param context -
|
|
329
|
-
* @returns
|
|
328
|
+
* @param context - The notification server actions context with paged-items collection access.
|
|
329
|
+
* @returns A transform-and-validate function that purges old logged-event days and returns aggregate counts.
|
|
330
330
|
*/
|
|
331
331
|
export declare function cleanupOldNotificationLoggedEventDaysFactory(context: NotificationServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<CleanupOldNotificationLoggedEventDaysParams, () => Promise<CleanupOldNotificationLoggedEventDaysResult>, object, unknown>;
|
|
@@ -74,8 +74,8 @@ export declare abstract class NotificationInitServerActions {
|
|
|
74
74
|
* Creates a concrete {@link NotificationInitServerActions} implementation by wiring each
|
|
75
75
|
* initialization action to its factory function.
|
|
76
76
|
*
|
|
77
|
-
* @param context -
|
|
78
|
-
* @returns
|
|
77
|
+
* @param context - The initialization context with template functions and Firestore access.
|
|
78
|
+
* @returns A fully wired {@link NotificationInitServerActions} instance.
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
81
|
* ```ts
|
|
@@ -106,9 +106,9 @@ export interface InitializeNotificationModelInTransactionInput<D extends Firesto
|
|
|
106
106
|
*
|
|
107
107
|
* Skips initialization if the model is already initialized, optionally throwing an error.
|
|
108
108
|
*
|
|
109
|
-
* @param input -
|
|
110
|
-
* @returns
|
|
111
|
-
* @throws
|
|
109
|
+
* @param input - The document, transaction, template function, and options.
|
|
110
|
+
* @returns An object with `initialized` and `alreadyInitialized` boolean flags.
|
|
111
|
+
* @throws {Error} NotificationModelAlreadyInitializedError when `throwErrorIfAlreadyInitialized` is true.
|
|
112
112
|
*/
|
|
113
113
|
export declare function initializeNotificationModelInTransaction<D extends FirestoreDocument<InitializedNotificationModel, any>>(input: InitializeNotificationModelInTransactionInput<D>): Promise<{
|
|
114
114
|
initialized: boolean;
|
|
@@ -120,8 +120,8 @@ export declare function initializeNotificationModelInTransaction<D extends Fires
|
|
|
120
120
|
* Loads the box document in the transaction, reads its current data, and delegates
|
|
121
121
|
* to {@link initializeNotificationModelInTransaction} with the box-specific template function.
|
|
122
122
|
*
|
|
123
|
-
* @param context -
|
|
124
|
-
* @returns
|
|
123
|
+
* @param context - The initialization context with collection references and template functions.
|
|
124
|
+
* @returns An async function that initializes a notification box given params, document, and transaction.
|
|
125
125
|
*/
|
|
126
126
|
export declare function initializeNotificationBoxInTransactionFactory(context: NotificationInitServerActionsContext): (params: InitializeNotificationModelParams, notificationBoxDocument: NotificationBoxDocument, transaction: Transaction) => Promise<{
|
|
127
127
|
initialized: boolean;
|
|
@@ -133,8 +133,8 @@ export declare function initializeNotificationBoxInTransactionFactory(context: N
|
|
|
133
133
|
* Wraps the in-transaction initialization in a Firestore transaction
|
|
134
134
|
* and follows the transform-and-validate pattern.
|
|
135
135
|
*
|
|
136
|
-
* @param context -
|
|
137
|
-
* @returns
|
|
136
|
+
* @param context - The initialization context with Firestore access and template functions.
|
|
137
|
+
* @returns A transform-and-validate function that initializes a single notification box.
|
|
138
138
|
*/
|
|
139
139
|
export declare function initializeNotificationBoxFactory(context: NotificationInitServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<InitializeNotificationModelParams, (notificationBoxDocument: NotificationBoxDocument) => Promise<NotificationBoxDocument>, object, unknown>;
|
|
140
140
|
/**
|
|
@@ -144,8 +144,8 @@ export declare function initializeNotificationBoxFactory(context: NotificationIn
|
|
|
144
144
|
* by querying for entries with `s=true` (setup needed), then initializing each in
|
|
145
145
|
* parallel (up to 5 concurrent tasks). Loops until no more flagged boxes are found.
|
|
146
146
|
*
|
|
147
|
-
* @param context -
|
|
148
|
-
* @returns
|
|
147
|
+
* @param context - The initialization context with Firestore access and collection references.
|
|
148
|
+
* @returns A transform-and-validate function that batch-initializes all applicable notification boxes.
|
|
149
149
|
*/
|
|
150
150
|
export declare function initializeAllApplicableNotificationBoxesFactory(context: NotificationInitServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<InitializeAllApplicableNotificationBoxesParams, () => Promise<InitializeAllApplicableNotificationBoxesResult>, object, unknown>;
|
|
151
151
|
/**
|
|
@@ -154,8 +154,8 @@ export declare function initializeAllApplicableNotificationBoxesFactory(context:
|
|
|
154
154
|
* Loads the summary document in the transaction, reads its current data, and delegates
|
|
155
155
|
* to {@link initializeNotificationModelInTransaction} with the summary-specific template function.
|
|
156
156
|
*
|
|
157
|
-
* @param context -
|
|
158
|
-
* @returns
|
|
157
|
+
* @param context - The initialization context with collection references and template functions.
|
|
158
|
+
* @returns An async function that initializes a notification summary given params, document, and transaction.
|
|
159
159
|
*/
|
|
160
160
|
export declare function initializeNotificationSummaryInTransactionFactory(context: NotificationInitServerActionsContext): (params: InitializeNotificationModelParams, notificationSummaryDocument: NotificationSummaryDocument, transaction: Transaction) => Promise<{
|
|
161
161
|
initialized: boolean;
|
|
@@ -167,8 +167,8 @@ export declare function initializeNotificationSummaryInTransactionFactory(contex
|
|
|
167
167
|
* Wraps the in-transaction summary initialization in a Firestore transaction
|
|
168
168
|
* and follows the transform-and-validate pattern.
|
|
169
169
|
*
|
|
170
|
-
* @param context -
|
|
171
|
-
* @returns
|
|
170
|
+
* @param context - The initialization context with Firestore access and template functions.
|
|
171
|
+
* @returns A transform-and-validate function that initializes a single notification summary.
|
|
172
172
|
*/
|
|
173
173
|
export declare function initializeNotificationSummaryFactory(context: NotificationInitServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<InitializeNotificationModelParams, (notificationSummaryDocument: NotificationSummaryDocument) => Promise<NotificationSummaryDocument>, object, unknown>;
|
|
174
174
|
/**
|
|
@@ -178,7 +178,7 @@ export declare function initializeNotificationSummaryFactory(context: Notificati
|
|
|
178
178
|
* by querying for entries with `s=true` (setup needed), then initializing each in
|
|
179
179
|
* parallel (up to 5 concurrent tasks). Loops until no more flagged summaries are found.
|
|
180
180
|
*
|
|
181
|
-
* @param context -
|
|
182
|
-
* @returns
|
|
181
|
+
* @param context - The initialization context with Firestore access and collection references.
|
|
182
|
+
* @returns A transform-and-validate function that batch-initializes all applicable notification summaries.
|
|
183
183
|
*/
|
|
184
184
|
export declare function initializeAllApplicableNotificationSummariesFactory(context: NotificationInitServerActionsContext): import("@dereekb/model").TransformAndValidateFunctionResultFunction<InitializeAllApplicableNotificationSummariesParams, () => Promise<InitializeAllApplicableNotificationSummariesResult>, object, unknown>;
|
|
@@ -27,16 +27,16 @@ export declare class NotificationTemplateService {
|
|
|
27
27
|
/**
|
|
28
28
|
* Returns the default factory and optional type-specific config for the given template type.
|
|
29
29
|
*
|
|
30
|
-
* @param type -
|
|
31
|
-
* @returns
|
|
30
|
+
* @param type - The notification template type to look up.
|
|
31
|
+
* @returns A tuple of [defaultFactory, typeConfig] where either may be undefined.
|
|
32
32
|
*/
|
|
33
33
|
configPairForType(type: NotificationTemplateType): [NotificationMessageFunctionFactory, Maybe<NotificationTemplateServiceTypeConfig>];
|
|
34
34
|
/**
|
|
35
35
|
* Creates a {@link NotificationTemplateServiceInstance} scoped to a single template type,
|
|
36
36
|
* pre-wired with the resolved factory for that type.
|
|
37
37
|
*
|
|
38
|
-
* @param type -
|
|
39
|
-
* @returns
|
|
38
|
+
* @param type - The notification template type.
|
|
39
|
+
* @returns A new {@link NotificationTemplateServiceInstance} bound to the given type.
|
|
40
40
|
*/
|
|
41
41
|
templateInstanceForType(type: NotificationTemplateType): NotificationTemplateServiceInstance;
|
|
42
42
|
}
|
|
@@ -74,9 +74,9 @@ export interface NotificationTemplateServiceInstance {
|
|
|
74
74
|
* Resolves the factory from the service's type-specific config first, falling back to
|
|
75
75
|
* a no-content default factory when no config is registered for the type.
|
|
76
76
|
*
|
|
77
|
-
* @param service -
|
|
78
|
-
* @param type -
|
|
79
|
-
* @returns
|
|
77
|
+
* @param service - The parent template service.
|
|
78
|
+
* @param type - The template type to bind.
|
|
79
|
+
* @returns A {@link NotificationTemplateServiceInstance} with the resolved factory for the type.
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
82
|
* ```ts
|
|
@@ -64,9 +64,9 @@ export interface CreateOrRunUniqueNotificationDocumentRunResult extends CreateNo
|
|
|
64
64
|
*
|
|
65
65
|
* Does not support Firestore transactions, as running should occur outside of a transaction.
|
|
66
66
|
*
|
|
67
|
-
* @param input -
|
|
68
|
-
* @returns
|
|
69
|
-
* @throws Error
|
|
67
|
+
* @param input - Creation and run configuration.
|
|
68
|
+
* @returns The creation pair result with optional send/enqueue outcomes.
|
|
69
|
+
* @throws {Error} If the notification template is not flagged as unique.
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
@@ -4,7 +4,7 @@ import { type FirestoreModelKey, type FirebaseAuthUserId } from '@dereekb/fireba
|
|
|
4
4
|
*
|
|
5
5
|
* Thrown when attempting to create a {@link Notification} document without providing the mandatory ID field.
|
|
6
6
|
*
|
|
7
|
-
* @returns
|
|
7
|
+
* @returns A precondition conflict error with the notification ID required error code.
|
|
8
8
|
*/
|
|
9
9
|
export declare function createNotificationIdRequiredError(): import("firebase-functions/https").HttpsError;
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ export declare function createNotificationIdRequiredError(): import("firebase-fu
|
|
|
13
13
|
* Thrown during initialization when `throwErrorIfAlreadyInitialized` is true and the model's
|
|
14
14
|
* setup flag (`s`) indicates it was previously initialized.
|
|
15
15
|
*
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns A precondition conflict error with the already-initialized error code.
|
|
17
17
|
*/
|
|
18
18
|
export declare function notificationModelAlreadyInitializedError(): import("firebase-functions/https").HttpsError;
|
|
19
19
|
/**
|
|
@@ -21,8 +21,8 @@ export declare function notificationModelAlreadyInitializedError(): import("fire
|
|
|
21
21
|
*
|
|
22
22
|
* Thrown when the model key's collection name does not match any registered notification model type.
|
|
23
23
|
*
|
|
24
|
-
* @param key -
|
|
25
|
-
* @returns
|
|
24
|
+
* @param key - The Firestore model key that has no registered notification model type.
|
|
25
|
+
* @returns A precondition conflict error with the unregistered model type error code.
|
|
26
26
|
*/
|
|
27
27
|
export declare function notificationBoxUnregistredModelTypeInitializationError(key: FirestoreModelKey): import("firebase-functions/https").HttpsError;
|
|
28
28
|
/**
|
|
@@ -30,7 +30,7 @@ export declare function notificationBoxUnregistredModelTypeInitializationError(k
|
|
|
30
30
|
*
|
|
31
31
|
* Thrown when an operation requires a NotificationBox but none has been created for the given model key.
|
|
32
32
|
*
|
|
33
|
-
* @returns
|
|
33
|
+
* @returns A precondition conflict error with the box-not-found error code.
|
|
34
34
|
*/
|
|
35
35
|
export declare function notificationBoxDoesNotExist(): import("firebase-functions/https").HttpsError;
|
|
36
36
|
/**
|
|
@@ -39,7 +39,7 @@ export declare function notificationBoxDoesNotExist(): import("firebase-function
|
|
|
39
39
|
* Thrown when the target recipient on the {@link NotificationBox} does not exist on the box
|
|
40
40
|
* or does not have a UID, making it ineligible for exclusion.
|
|
41
41
|
*
|
|
42
|
-
* @returns
|
|
42
|
+
* @returns A precondition conflict error with the invalid exclusion target error code.
|
|
43
43
|
*/
|
|
44
44
|
export declare function notificationBoxExclusionTargetInvalidError(): import("firebase-functions/https").HttpsError;
|
|
45
45
|
/**
|
|
@@ -47,7 +47,7 @@ export declare function notificationBoxExclusionTargetInvalidError(): import("fi
|
|
|
47
47
|
*
|
|
48
48
|
* Thrown when attempting to create a duplicate NotificationBox for a model that already has one.
|
|
49
49
|
*
|
|
50
|
-
* @returns
|
|
50
|
+
* @returns A precondition conflict error with the box-exists error code.
|
|
51
51
|
*/
|
|
52
52
|
export declare function notificationBoxExistsForModelError(): import("firebase-functions/https").HttpsError;
|
|
53
53
|
/**
|
|
@@ -56,7 +56,7 @@ export declare function notificationBoxExistsForModelError(): import("firebase-f
|
|
|
56
56
|
* Thrown when attempting to update a recipient that is not registered on the box
|
|
57
57
|
* and `insert=true` was not passed to allow creating a new recipient entry.
|
|
58
58
|
*
|
|
59
|
-
* @returns
|
|
59
|
+
* @returns A precondition conflict error with the recipient-not-found error code.
|
|
60
60
|
*/
|
|
61
61
|
export declare function notificationBoxRecipientDoesNotExistsError(): import("firebase-functions/https").HttpsError;
|
|
62
62
|
/**
|
|
@@ -64,8 +64,8 @@ export declare function notificationBoxRecipientDoesNotExistsError(): import("fi
|
|
|
64
64
|
*
|
|
65
65
|
* Thrown during {@link NotificationUser} creation when the provided UID cannot be found in Firebase Auth.
|
|
66
66
|
*
|
|
67
|
-
* @param uid -
|
|
68
|
-
* @returns
|
|
67
|
+
* @param uid - The Firebase Auth user ID that was not found.
|
|
68
|
+
* @returns A precondition conflict error with the invalid-uid error code.
|
|
69
69
|
*/
|
|
70
70
|
export declare function notificationUserInvalidUidForCreateError(uid: FirebaseAuthUserId): import("firebase-functions/https").HttpsError;
|
|
71
71
|
/**
|
|
@@ -74,8 +74,8 @@ export declare function notificationUserInvalidUidForCreateError(uid: FirebaseAu
|
|
|
74
74
|
* Thrown when a {@link NotificationUser} has the `bk` (blocked-from-add) flag set on their config
|
|
75
75
|
* and an operation attempts to insert them into a {@link NotificationBox}'s recipient list.
|
|
76
76
|
*
|
|
77
|
-
* @param uid -
|
|
78
|
-
* @returns
|
|
77
|
+
* @param uid - The Firebase Auth user ID of the blocked user.
|
|
78
|
+
* @returns A precondition conflict error with the blocked-from-add error code.
|
|
79
79
|
*/
|
|
80
80
|
export declare function notificationUserBlockedFromBeingAddedToRecipientsError(uid: FirebaseAuthUserId): import("firebase-functions/https").HttpsError;
|
|
81
81
|
/**
|
|
@@ -84,7 +84,7 @@ export declare function notificationUserBlockedFromBeingAddedToRecipientsError(u
|
|
|
84
84
|
* Thrown when a {@link NotificationUser} has the `lk` (locked) flag set on their config
|
|
85
85
|
* and an operation attempts to modify their recipient settings on a {@link NotificationBox}.
|
|
86
86
|
*
|
|
87
|
-
* @param uid -
|
|
88
|
-
* @returns
|
|
87
|
+
* @param uid - The Firebase Auth user ID of the locked user.
|
|
88
|
+
* @returns A precondition conflict error with the locked-config error code.
|
|
89
89
|
*/
|
|
90
90
|
export declare function notificationUserLockedConfigFromBeingUpdatedError(uid: FirebaseAuthUserId): import("firebase-functions/https").HttpsError;
|
|
@@ -47,9 +47,9 @@ export interface NotificationExpediteServiceInstance {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Creates a new NotificationExpediteServiceInstance with the input NotificationExpediteService.
|
|
50
|
-
|
|
51
|
-
* @param notificationExpediteService -
|
|
52
|
-
* @returns
|
|
50
|
+
*
|
|
51
|
+
* @param notificationExpediteService - The expedite service to use for sending.
|
|
52
|
+
* @returns A new {@link NotificationExpediteServiceInstance} with an internal queue.
|
|
53
53
|
*/
|
|
54
54
|
export declare function notificationExpediteServiceInstance(notificationExpediteService: NotificationExpediteService): NotificationExpediteServiceInstance;
|
|
55
55
|
/**
|
|
@@ -71,13 +71,13 @@ export declare class MutableNotificationExpediteService implements NotificationE
|
|
|
71
71
|
/**
|
|
72
72
|
* Returns the configured NotificationServerActions instance.
|
|
73
73
|
*
|
|
74
|
-
* @returns
|
|
74
|
+
* @returns The current {@link NotificationServerActions} instance.
|
|
75
75
|
*/
|
|
76
76
|
getNotificationServerActions(): NotificationServerActions;
|
|
77
77
|
/**
|
|
78
78
|
* Sets the NotificationServerActions instance to use.
|
|
79
79
|
*
|
|
80
|
-
* @param notificationServerActions -
|
|
80
|
+
* @param notificationServerActions - The actions instance to configure.
|
|
81
81
|
*/
|
|
82
82
|
setNotificationServerActions(notificationServerActions: NotificationServerActions): void;
|
|
83
83
|
sendNotification(notificationDocument: NotificationDocument, options?: NotificationExpediteServiceSendNotificationOptions): Promise<SendNotificationResult>;
|
|
@@ -88,7 +88,7 @@ export declare class MutableNotificationExpediteService implements NotificationE
|
|
|
88
88
|
*
|
|
89
89
|
* This should generally be used in the global module of an app.
|
|
90
90
|
*
|
|
91
|
-
* @returns
|
|
91
|
+
* @returns Array of NestJS providers for both MutableNotificationExpediteService and NotificationExpediteService.
|
|
92
92
|
*/
|
|
93
93
|
export declare function provideMutableNotificationExpediteService(): Provider[];
|
|
94
94
|
/**
|
|
@@ -96,6 +96,6 @@ export declare function provideMutableNotificationExpediteService(): Provider[];
|
|
|
96
96
|
*
|
|
97
97
|
* This should generally be used in the global module of an app.
|
|
98
98
|
*
|
|
99
|
-
* @returns
|
|
99
|
+
* @returns The abstract classes to export from the NestJS module.
|
|
100
100
|
*/
|
|
101
101
|
export declare function exportMutableNotificationExpediteService(): Abstract<any>[];
|
|
@@ -10,12 +10,12 @@ import { MutableNotificationExpediteService, NotificationExpediteService } from
|
|
|
10
10
|
* Factory that assembles the full {@link NotificationServerActionsContext} by combining
|
|
11
11
|
* the base context with the template, send, task, and expedite services.
|
|
12
12
|
*
|
|
13
|
-
* @param context -
|
|
14
|
-
* @param notificationTemplateService -
|
|
15
|
-
* @param notificationSendService -
|
|
16
|
-
* @param notificationTaskService -
|
|
17
|
-
* @param notificationsExpediteService -
|
|
18
|
-
* @returns
|
|
13
|
+
* @param context - The base server actions context.
|
|
14
|
+
* @param notificationTemplateService - Resolves message factories for notification template types.
|
|
15
|
+
* @param notificationSendService - Handles sending notification messages.
|
|
16
|
+
* @param notificationTaskService - Handles notification task dispatch.
|
|
17
|
+
* @param notificationsExpediteService - Expedites immediate notification delivery.
|
|
18
|
+
* @returns The assembled {@link NotificationServerActionsContext}
|
|
19
19
|
*/
|
|
20
20
|
export declare function notificationServerActionsContextFactory(context: BaseNotificationServerActionsContext, notificationTemplateService: NotificationTemplateService, notificationSendService: NotificationSendService, notificationTaskService: NotificationTaskService, notificationsExpediteService: NotificationExpediteService): {
|
|
21
21
|
notificationTemplateService: NotificationTemplateService;
|
|
@@ -41,17 +41,17 @@ export declare function notificationServerActionsContextFactory(context: BaseNot
|
|
|
41
41
|
/**
|
|
42
42
|
* Factory that creates a {@link NotificationServerActions} instance from the assembled context.
|
|
43
43
|
*
|
|
44
|
-
* @param context -
|
|
45
|
-
* @returns
|
|
44
|
+
* @param context - The assembled notification server actions context.
|
|
45
|
+
* @returns A new {@link NotificationServerActions} instance.
|
|
46
46
|
*/
|
|
47
47
|
export declare function notificationServerActionsFactory(context: NotificationServerActionsContext): NotificationServerActions;
|
|
48
48
|
/**
|
|
49
49
|
* Factory that creates a {@link NotificationInitServerActions} instance by merging the
|
|
50
50
|
* server actions context with the init-specific configuration.
|
|
51
51
|
*
|
|
52
|
-
* @param context -
|
|
53
|
-
* @param notificationInitServerActionsContextConfig -
|
|
54
|
-
* @returns
|
|
52
|
+
* @param context - The assembled notification server actions context.
|
|
53
|
+
* @param notificationInitServerActionsContextConfig - Init-specific configuration.
|
|
54
|
+
* @returns A new {@link NotificationInitServerActions} instance.
|
|
55
55
|
*/
|
|
56
56
|
export declare function notificationInitServerActionsFactory(context: NotificationServerActionsContext, notificationInitServerActionsContextConfig: NotificationInitServerActionsContextConfig): NotificationInitServerActions;
|
|
57
57
|
export interface ProvideAppNotificationMetadataConfig extends Pick<ModuleMetadata, 'imports' | 'exports' | 'providers'> {
|
|
@@ -80,8 +80,8 @@ export interface ProvideAppNotificationMetadataConfig extends Pick<ModuleMetadat
|
|
|
80
80
|
*
|
|
81
81
|
* Be sure the class that delares the module using this function also extends AbstractAppNotificationModule.
|
|
82
82
|
*
|
|
83
|
-
* @param config -
|
|
84
|
-
* @returns
|
|
83
|
+
* @param config - Module metadata configuration including dependency module and additional providers.
|
|
84
|
+
* @returns The assembled {@link ModuleMetadata} for the notification module.
|
|
85
85
|
*/
|
|
86
86
|
export declare function appNotificationModuleMetadata(config: ProvideAppNotificationMetadataConfig): ModuleMetadata;
|
|
87
87
|
/**
|
|
@@ -32,8 +32,8 @@ export type FirestoreNotificationSummarySendService = NotificationSummarySendSer
|
|
|
32
32
|
*
|
|
33
33
|
* Each summary update runs in a Firestore transaction to prevent concurrent write conflicts.
|
|
34
34
|
*
|
|
35
|
-
* @param config -
|
|
36
|
-
* @returns
|
|
35
|
+
* @param config - Service configuration including Firestore context and collection references.
|
|
36
|
+
* @returns A {@link NotificationSummarySendService} backed by Firestore.
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -6,7 +6,7 @@ import { type NotificationTextSendService } from './notification.send.service';
|
|
|
6
6
|
* Useful as a placeholder when your app's notification pipeline is fully wired for SMS
|
|
7
7
|
* but actual delivery is not yet enabled, avoiding the need for conditional logic elsewhere.
|
|
8
8
|
*
|
|
9
|
-
* @returns
|
|
9
|
+
* @returns A no-op {@link NotificationTextSendService} that ignores all messages.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
@@ -46,8 +46,8 @@ export interface NotificationTaskServiceConfig {
|
|
|
46
46
|
* finds the next uncompleted checkpoint in the flow and executes its handler function.
|
|
47
47
|
* If all checkpoints are complete, the task is marked as done.
|
|
48
48
|
*
|
|
49
|
-
* @param config -
|
|
50
|
-
* @returns
|
|
49
|
+
* @param config - Handler configurations and optional validation list.
|
|
50
|
+
* @returns A {@link NotificationTaskService} that dispatches tasks to the registered handlers.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```ts
|
|
@@ -6,9 +6,9 @@ import { type NotificationTaskCheckpointString, type NotificationTaskServiceHand
|
|
|
6
6
|
* If `removeFromCompletedCheckpoints` is set, removes only those specific checkpoints.
|
|
7
7
|
* Otherwise, returns the original array unchanged.
|
|
8
8
|
*
|
|
9
|
-
* @param inputCompletions -
|
|
10
|
-
* @param handleTaskResult -
|
|
11
|
-
* @returns
|
|
9
|
+
* @param inputCompletions - The current list of completed checkpoint strings.
|
|
10
|
+
* @param handleTaskResult - The handler result containing removal instructions.
|
|
11
|
+
* @returns The filtered completions array with specified checkpoints removed.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|