@dereekb/firebase 13.11.14 → 13.11.16
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/eslint/index.cjs.default.js +1 -0
- package/eslint/index.cjs.js +2290 -0
- package/eslint/index.cjs.mjs +2 -0
- package/eslint/index.d.ts +1 -0
- package/eslint/index.esm.js +2277 -0
- package/eslint/package.json +24 -0
- package/eslint/src/index.d.ts +1 -0
- package/eslint/src/lib/comments.d.ts +112 -0
- package/eslint/src/lib/dbx-tag-families.d.ts +280 -0
- package/eslint/src/lib/index.d.ts +6 -0
- package/eslint/src/lib/jsdoc-parser.d.ts +116 -0
- package/eslint/src/lib/plugin.d.ts +28 -0
- package/eslint/src/lib/require-dbx-model-firebase-index-companion-tags.rule.d.ts +47 -0
- package/eslint/src/lib/require-dbx-model-firebase-index-query-suffix.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-model-firebase-index-valid-dispatcher.rule.d.ts +54 -0
- package/eslint/src/lib/require-tagged-firestore-constraints.rule.d.ts +46 -0
- package/eslint/src/lib/util.d.ts +107 -0
- package/index.cjs.js +1446 -1137
- package/index.esm.js +1437 -1128
- package/package.json +11 -5
- package/src/lib/client/error/error.d.ts +1 -1
- package/src/lib/client/firestore/array.d.ts +3 -2
- package/src/lib/client/firestore/driver.accessor.batch.d.ts +5 -4
- package/src/lib/client/firestore/driver.accessor.create.d.ts +4 -3
- package/src/lib/client/firestore/driver.accessor.d.ts +2 -1
- package/src/lib/client/firestore/driver.accessor.default.d.ts +5 -3
- package/src/lib/client/firestore/driver.accessor.transaction.d.ts +7 -5
- package/src/lib/client/firestore/driver.d.ts +1 -1
- package/src/lib/client/firestore/driver.query.d.ts +5 -5
- package/src/lib/client/firestore/increment.d.ts +3 -2
- package/src/lib/client/function/development.function.factory.d.ts +3 -2
- package/src/lib/client/function/error.d.ts +2 -2
- package/src/lib/client/function/function.callable.d.ts +5 -5
- package/src/lib/client/function/function.factory.d.ts +6 -4
- package/src/lib/client/function/model.function.factory.d.ts +9 -8
- package/src/lib/client/storage/driver.accessor.d.ts +14 -14
- package/src/lib/client/storage/driver.d.ts +1 -1
- package/src/lib/common/auth/auth.error.d.ts +2 -2
- package/src/lib/common/development/function.d.ts +5 -5
- package/src/lib/common/firestore/accessor/accessor.d.ts +22 -16
- package/src/lib/common/firestore/accessor/accessor.wrap.d.ts +33 -29
- package/src/lib/common/firestore/accessor/accessor.wrap.modify.d.ts +11 -7
- package/src/lib/common/firestore/accessor/array.d.ts +3 -2
- package/src/lib/common/firestore/accessor/document.d.ts +27 -24
- package/src/lib/common/firestore/accessor/document.paged.d.ts +2 -2
- package/src/lib/common/firestore/accessor/document.rxjs.d.ts +15 -12
- package/src/lib/common/firestore/accessor/document.utility.d.ts +81 -72
- package/src/lib/common/firestore/accessor/increment.d.ts +3 -2
- package/src/lib/common/firestore/cache/cache.d.ts +8 -7
- package/src/lib/common/firestore/cache/cache.memory.d.ts +13 -10
- package/src/lib/common/firestore/collection/collection.d.ts +62 -42
- package/src/lib/common/firestore/collection/collection.group.d.ts +4 -2
- package/src/lib/common/firestore/collection/collection.query.d.ts +7 -4
- package/src/lib/common/firestore/collection/collection.single.d.ts +4 -2
- package/src/lib/common/firestore/collection/collection.util.d.ts +3 -2
- package/src/lib/common/firestore/collection/subcollection.d.ts +4 -2
- package/src/lib/common/firestore/collection/subcollection.paged.d.ts +7 -3
- package/src/lib/common/firestore/collection/subcollection.single.d.ts +4 -2
- package/src/lib/common/firestore/context.d.ts +4 -2
- package/src/lib/common/firestore/driver/query.handler.d.ts +4 -3
- package/src/lib/common/firestore/error.d.ts +6 -5
- package/src/lib/common/firestore/query/constraint.d.ts +56 -36
- package/src/lib/common/firestore/query/constraint.template.d.ts +15 -7
- package/src/lib/common/firestore/query/iterator.d.ts +20 -13
- package/src/lib/common/firestore/query/query.d.ts +6 -4
- package/src/lib/common/firestore/query/query.iterate.array.d.ts +10 -6
- package/src/lib/common/firestore/query/query.iterate.d.ts +8 -8
- package/src/lib/common/firestore/query/query.util.d.ts +11 -7
- package/src/lib/common/firestore/query/watcher.d.ts +9 -7
- package/src/lib/common/firestore/snapshot/snapshot.d.ts +6 -3
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +230 -132
- package/src/lib/common/firestore/util/id.batch.d.ts +4 -2
- package/src/lib/common/model/function.d.ts +21 -20
- package/src/lib/common/model/model/model.loader.d.ts +2 -2
- package/src/lib/common/model/model.service.d.ts +28 -20
- package/src/lib/common/model/permission/permission.service.d.ts +3 -2
- package/src/lib/common/model/permission/permission.service.grant.d.ts +27 -21
- package/src/lib/common/model/permission/permission.service.role.d.ts +7 -7
- package/src/lib/common/storage/accessor/path.model.d.ts +3 -2
- package/src/lib/common/storage/context.d.ts +3 -2
- package/src/lib/common/storage/driver/accessor.iterate.d.ts +7 -6
- package/src/lib/common/storage/driver/accessor.util.d.ts +4 -4
- package/src/lib/common/storage/driver/error.d.ts +3 -3
- package/src/lib/common/storage/driver/list.d.ts +4 -3
- package/src/lib/common/storage/storage.d.ts +9 -8
- package/src/lib/common/storage/types.d.ts +1 -1
- package/src/lib/model/notification/notification.api.d.ts +2 -2
- package/src/lib/model/notification/notification.api.util.d.ts +16 -16
- package/src/lib/model/notification/notification.config.d.ts +35 -34
- package/src/lib/model/notification/notification.create.d.ts +17 -15
- package/src/lib/model/notification/notification.create.loggedevent.d.ts +3 -2
- package/src/lib/model/notification/notification.create.task.d.ts +3 -2
- package/src/lib/model/notification/notification.d.ts +53 -45
- package/src/lib/model/notification/notification.details.d.ts +5 -4
- package/src/lib/model/notification/notification.id.d.ts +8 -8
- package/src/lib/model/notification/notification.item.d.ts +3 -3
- package/src/lib/model/notification/notification.loggedevent.loader.d.ts +2 -2
- package/src/lib/model/notification/notification.message.d.ts +6 -4
- package/src/lib/model/notification/notification.query.d.ts +12 -12
- package/src/lib/model/notification/notification.send.d.ts +3 -3
- package/src/lib/model/notification/notification.task.d.ts +15 -15
- package/src/lib/model/notification/notification.task.subtask.d.ts +3 -3
- package/src/lib/model/notification/notification.util.d.ts +29 -29
- package/src/lib/model/oidcmodel/oidcmodel.api.d.ts +2 -2
- package/src/lib/model/oidcmodel/oidcmodel.d.ts +6 -6
- package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +18 -18
- package/src/lib/model/storagefile/storagefile.api.d.ts +2 -2
- package/src/lib/model/storagefile/storagefile.create.d.ts +8 -7
- package/src/lib/model/storagefile/storagefile.d.ts +19 -18
- package/src/lib/model/storagefile/storagefile.file.d.ts +2 -1
- package/src/lib/model/storagefile/storagefile.group.d.ts +5 -5
- package/src/lib/model/storagefile/storagefile.permission.d.ts +3 -2
- package/src/lib/model/storagefile/storagefile.query.d.ts +15 -15
- package/src/lib/model/storagefile/storagefile.task.d.ts +2 -2
- package/src/lib/model/storagefile/storagefile.upload.claims.d.ts +4 -4
- package/src/lib/model/storagefile/storagefile.upload.d.ts +8 -6
- package/src/lib/model/storagefile/storagefile.upload.determiner.d.ts +18 -16
- package/src/lib/model/storagefile/storagefile.util.d.ts +8 -8
- package/src/lib/model/system/system.d.ts +6 -6
- package/test/index.cjs.js +43 -43
- package/test/index.esm.js +38 -38
- package/test/package.json +6 -6
- package/test/src/lib/client/firebase.d.ts +1 -1
- package/test/src/lib/common/firestore/firestore.d.ts +3 -3
- package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +3 -3
- package/test/src/lib/common/mock/mock.item.d.ts +16 -16
- package/test/src/lib/common/mock/mock.item.query.d.ts +4 -4
- package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +3 -3
- package/test/src/lib/common/storage/storage.d.ts +1 -1
|
@@ -97,8 +97,8 @@ export type NotificationSummaryIdForUidFunction = FactoryWithRequiredInput<Notif
|
|
|
97
97
|
* Creates a {@link NotificationSummaryIdForUidFunction} that generates summary IDs
|
|
98
98
|
* by combining the given user model identity with the provided UID.
|
|
99
99
|
*
|
|
100
|
-
* @param userModelIdentity -
|
|
101
|
-
* @returns
|
|
100
|
+
* @param userModelIdentity - Root identity for the user model (e.g., `profileIdentity`).
|
|
101
|
+
* @returns Function that maps a user UID to its {@link NotificationSummaryId}.
|
|
102
102
|
*
|
|
103
103
|
* @example
|
|
104
104
|
* ```ts
|
|
@@ -128,14 +128,14 @@ export type NotificationLoggedEventDayKey = FirestoreModelKey;
|
|
|
128
128
|
* Returns the {@link NotificationLoggedEventDayId} (an ISO 8601 day string in UTC)
|
|
129
129
|
* for the given date. Used as the document ID when archiving logged-event notifications.
|
|
130
130
|
*
|
|
131
|
+
* @param date - Instant whose UTC calendar day is captured.
|
|
132
|
+
* @returns UTC ISO day string for that instant.
|
|
133
|
+
*
|
|
131
134
|
* @example
|
|
132
135
|
* ```ts
|
|
133
136
|
* notificationLoggedEventDayId(new Date('2026-05-08T17:30:00Z'));
|
|
134
137
|
* // '2026-05-08'
|
|
135
138
|
* ```
|
|
136
|
-
*
|
|
137
|
-
* @param date - the date to derive the day ID from
|
|
138
|
-
* @returns the UTC ISO day string for that date
|
|
139
139
|
*/
|
|
140
140
|
export declare function notificationLoggedEventDayId(date: Date): NotificationLoggedEventDayId;
|
|
141
141
|
/**
|
|
@@ -209,8 +209,8 @@ export interface NotificationTaskKeyRef {
|
|
|
209
209
|
/**
|
|
210
210
|
* Creates a NotificationTaskUniqueId from the input model id and task type.
|
|
211
211
|
*
|
|
212
|
-
* @param input -
|
|
213
|
-
* @param taskType -
|
|
214
|
-
* @returns
|
|
212
|
+
* @param input - Model id input.
|
|
213
|
+
* @param taskType - Task type.
|
|
214
|
+
* @returns The unique notification task id combining the model id and task type.
|
|
215
215
|
*/
|
|
216
216
|
export declare function notificationTaskUniqueId(input: FirestoreModelIdInput, taskType: NotificationTaskType): NotificationTaskUniqueId;
|
|
@@ -97,9 +97,9 @@ export interface UnreadNotificationItemsResult<D extends NotificationItemMetadat
|
|
|
97
97
|
* Items are considered read if their `v` flag is true OR if they were created before the `considerReadIfCreatedBefore` date.
|
|
98
98
|
* This is used with {@link NotificationSummary.rat} to mark all older items as read.
|
|
99
99
|
*
|
|
100
|
-
* @param items -
|
|
101
|
-
* @param considerReadIfCreatedBefore -
|
|
102
|
-
* @returns
|
|
100
|
+
* @param items - Notification items to classify.
|
|
101
|
+
* @param considerReadIfCreatedBefore - Optional cutoff date; items created at or before this date are treated as read.
|
|
102
|
+
* @returns An object containing both the read and unread item arrays along with the input cutoff date.
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
105
|
* ```ts
|
|
@@ -76,7 +76,7 @@ export interface NotificationLoggedEventLoader {
|
|
|
76
76
|
*
|
|
77
77
|
* Cache lifetime is the loader instance — create one per request/transaction; do not retain.
|
|
78
78
|
*
|
|
79
|
-
* @param config -
|
|
80
|
-
* @returns
|
|
79
|
+
* @param config - Notification collections, the parent {@link NotificationBoxDocument}, optional transaction.
|
|
80
|
+
* @returns The cached loader.
|
|
81
81
|
*/
|
|
82
82
|
export declare function notificationLoggedEventLoader(config: NotificationLoggedEventLoaderConfig): NotificationLoggedEventLoader;
|
|
@@ -266,9 +266,9 @@ export type NotificationMessageFunction = NotificationMessageFunctionWithoutExtr
|
|
|
266
266
|
* Creates a {@link NotificationMessageFunction} by attaching optional {@link NotificationMessageFunctionExtras}
|
|
267
267
|
* (global recipients, lifecycle callbacks) to a base message generation function.
|
|
268
268
|
*
|
|
269
|
-
* @param fn -
|
|
270
|
-
* @param extras -
|
|
271
|
-
* @returns
|
|
269
|
+
* @param fn - Base function that generates message content per recipient.
|
|
270
|
+
* @param extras - Optional delivery customization (global recipients, send callbacks)
|
|
271
|
+
* @returns A {@link NotificationMessageFunction} with the extras attached.
|
|
272
272
|
*
|
|
273
273
|
* @example
|
|
274
274
|
* ```ts
|
|
@@ -280,6 +280,7 @@ export type NotificationMessageFunction = NotificationMessageFunctionWithoutExtr
|
|
|
280
280
|
* { globalRecipients: [adminRecipient] }
|
|
281
281
|
* );
|
|
282
282
|
* ```
|
|
283
|
+
*
|
|
283
284
|
* @__NO_SIDE_EFFECTS__
|
|
284
285
|
*/
|
|
285
286
|
export declare function notificationMessageFunction(fn: NotificationMessageFunctionWithoutExtras, extras?: NotificationMessageFunctionExtras): NotificationMessageFunction;
|
|
@@ -288,7 +289,7 @@ export declare function notificationMessageFunction(fn: NotificationMessageFunct
|
|
|
288
289
|
*
|
|
289
290
|
* Useful as a placeholder factory for template types that should not produce deliverable content.
|
|
290
291
|
*
|
|
291
|
-
* @returns
|
|
292
|
+
* @returns A factory that produces no-content message functions.
|
|
292
293
|
*
|
|
293
294
|
* @example
|
|
294
295
|
* ```ts
|
|
@@ -297,6 +298,7 @@ export declare function notificationMessageFunction(fn: NotificationMessageFunct
|
|
|
297
298
|
* const msg = await msgFn(inputContext);
|
|
298
299
|
* // msg.flag === NotificationMessageFlag.NO_CONTENT
|
|
299
300
|
* ```
|
|
301
|
+
*
|
|
300
302
|
* @__NO_SIDE_EFFECTS__
|
|
301
303
|
*/
|
|
302
304
|
export declare function noContentNotificationMessageFunctionFactory<D extends NotificationItemMetadata = {}>(): NotificationMessageFunctionFactory<D>;
|
|
@@ -12,26 +12,26 @@ import { type ArrayOrValue } from '@dereekb/util';
|
|
|
12
12
|
*
|
|
13
13
|
* Used by the server to discover users whose configs need to be synced to their NotificationBox recipients.
|
|
14
14
|
*
|
|
15
|
-
* @returns
|
|
15
|
+
* @returns Array of Firestore query constraints filtering for users needing sync.
|
|
16
16
|
*/
|
|
17
17
|
export declare function notificationUsersFlaggedForNeedsSyncQuery(): FirestoreQueryConstraint[];
|
|
18
18
|
/**
|
|
19
19
|
* Query constraints for finding {@link NotificationUser} documents that have any of the given exclusion IDs in their `x` array.
|
|
20
20
|
*
|
|
21
|
-
* @param exclusionId -
|
|
22
|
-
* @returns
|
|
21
|
+
* @param exclusionId - One or more box IDs or collection name prefixes to match against.
|
|
22
|
+
* @returns Array of Firestore query constraints filtering for users with matching exclusions.
|
|
23
23
|
*/
|
|
24
24
|
export declare function notificationUserHasExclusionQuery(exclusionId: ArrayOrValue<NotificationBoxSendExclusion>): FirestoreQueryConstraint[];
|
|
25
25
|
/**
|
|
26
26
|
* Query constraints for finding {@link NotificationSummary} documents that need server-side initialization (`s == true`).
|
|
27
27
|
*
|
|
28
|
-
* @returns
|
|
28
|
+
* @returns Array of Firestore query constraints filtering for summaries needing initialization.
|
|
29
29
|
*/
|
|
30
30
|
export declare function notificationSummariesFlaggedForNeedsInitializationQuery(): FirestoreQueryConstraint[];
|
|
31
31
|
/**
|
|
32
32
|
* Query constraints for finding {@link NotificationBox} documents that need server-side initialization (`s == true`).
|
|
33
33
|
*
|
|
34
|
-
* @returns
|
|
34
|
+
* @returns Array of Firestore query constraints filtering for boxes needing initialization.
|
|
35
35
|
*/
|
|
36
36
|
export declare function notificationBoxesFlaggedForNeedsInitializationQuery(): FirestoreQueryConstraint[];
|
|
37
37
|
/**
|
|
@@ -39,7 +39,7 @@ export declare function notificationBoxesFlaggedForNeedsInitializationQuery(): F
|
|
|
39
39
|
*
|
|
40
40
|
* Used by the server to clean up boxes that could not be initialized.
|
|
41
41
|
*
|
|
42
|
-
* @returns
|
|
42
|
+
* @returns Array of Firestore query constraints filtering for boxes flagged as invalid.
|
|
43
43
|
*/
|
|
44
44
|
export declare function notificationBoxesFlaggedInvalidQuery(): FirestoreQueryConstraint[];
|
|
45
45
|
/**
|
|
@@ -48,15 +48,15 @@ export declare function notificationBoxesFlaggedInvalidQuery(): FirestoreQueryCo
|
|
|
48
48
|
*
|
|
49
49
|
* This is the primary query used by the send queue processor.
|
|
50
50
|
*
|
|
51
|
-
* @param now -
|
|
52
|
-
* @returns
|
|
51
|
+
* @param now - Reference time for the `sat` comparison (defaults to current time)
|
|
52
|
+
* @returns Array of Firestore query constraints filtering for notifications past their scheduled send time.
|
|
53
53
|
*/
|
|
54
54
|
export declare function notificationsPastSendAtTimeQuery(now?: Date): FirestoreQueryConstraint[];
|
|
55
55
|
/**
|
|
56
56
|
* Query constraints for finding {@link Notification} documents marked as done (`d == true`)
|
|
57
57
|
* and ready to be archived to {@link NotificationWeek} and then deleted.
|
|
58
58
|
*
|
|
59
|
-
* @returns
|
|
59
|
+
* @returns Array of Firestore query constraints filtering for completed notifications ready to archive.
|
|
60
60
|
*/
|
|
61
61
|
export declare function notificationsReadyForCleanupQuery(): FirestoreQueryConstraint[];
|
|
62
62
|
/**
|
|
@@ -71,8 +71,8 @@ export declare function notificationsReadyForCleanupQuery(): FirestoreQueryConst
|
|
|
71
71
|
* `FieldPath.documentId()` with a bare day string (it requires a full path). The `d` field stores
|
|
72
72
|
* the same ISO 8601 day string as the document ID and supports a plain inequality.
|
|
73
73
|
*
|
|
74
|
-
* @param retentionDays -
|
|
75
|
-
* @param now -
|
|
76
|
-
* @returns
|
|
74
|
+
* @param retentionDays - Number of days of history to retain; days strictly older than `now - retentionDays` match.
|
|
75
|
+
* @param now - Reference time for the cutoff (defaults to current time)
|
|
76
|
+
* @returns Array of Firestore query constraints filtering by the day string.
|
|
77
77
|
*/
|
|
78
78
|
export declare function notificationLoggedEventDaysOlderThanQuery(retentionDays: number, now?: Date): FirestoreQueryConstraint[];
|
|
@@ -35,9 +35,9 @@ export interface NotificationSendMessagesResult<K> {
|
|
|
35
35
|
*
|
|
36
36
|
* Used when combining results from multiple send batches within the same channel.
|
|
37
37
|
*
|
|
38
|
-
* @param a -
|
|
39
|
-
* @param b -
|
|
40
|
-
* @returns
|
|
38
|
+
* @param a - First result to merge.
|
|
39
|
+
* @param b - Second result to merge.
|
|
40
|
+
* @returns A new result with all recipient lists concatenated from both inputs.
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
@@ -78,7 +78,7 @@ export interface NotificationTask<D extends NotificationItemMetadata = {}> {
|
|
|
78
78
|
* Use this when the handler needs more time but doesn't want to increment the failure counter.
|
|
79
79
|
* The task will be re-queued without counting as an error attempt.
|
|
80
80
|
*
|
|
81
|
-
* @returns
|
|
81
|
+
* @returns An empty checkpoint array signaling in-progress without failure.
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
84
|
* ```ts
|
|
@@ -92,9 +92,9 @@ export declare function delayCompletion<S extends NotificationTaskCheckpointStri
|
|
|
92
92
|
*
|
|
93
93
|
* Use when the task needs to wait (e.g., for an external API to complete) but hasn't failed.
|
|
94
94
|
*
|
|
95
|
-
* @param delayUntil -
|
|
96
|
-
* @param updateMetadata -
|
|
97
|
-
* @returns
|
|
95
|
+
* @param delayUntil - Absolute date or relative milliseconds from the task's run start time.
|
|
96
|
+
* @param updateMetadata - Optional metadata updates to merge into the notification item.
|
|
97
|
+
* @returns A task result that re-queues the task after the specified delay without marking it failed.
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
100
100
|
* ```ts
|
|
@@ -109,9 +109,9 @@ export declare function notificationTaskDelayRetry<D extends NotificationItemMet
|
|
|
109
109
|
* The completed checkpoint strings are added to the notification's `tpr` set. The task is re-queued
|
|
110
110
|
* for the next checkpoint.
|
|
111
111
|
*
|
|
112
|
-
* @param completedParts -
|
|
113
|
-
* @param updateMetadata -
|
|
114
|
-
* @returns
|
|
112
|
+
* @param completedParts - Checkpoint string(s) that were just completed.
|
|
113
|
+
* @param updateMetadata - Optional metadata updates to merge into the notification item.
|
|
114
|
+
* @returns A task result marking the given checkpoints complete while keeping the task running.
|
|
115
115
|
*
|
|
116
116
|
* @example
|
|
117
117
|
* ```ts
|
|
@@ -123,8 +123,8 @@ export declare function notificationTaskPartiallyComplete<D extends Notification
|
|
|
123
123
|
/**
|
|
124
124
|
* Returns a result indicating the task completed successfully. The notification document will be deleted.
|
|
125
125
|
*
|
|
126
|
-
* @param updateMetadata -
|
|
127
|
-
* @returns
|
|
126
|
+
* @param updateMetadata - Optional final metadata update (applied before deletion if subtasks need it)
|
|
127
|
+
* @returns A task result signaling successful completion; the notification document will be deleted.
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
130
|
* ```ts
|
|
@@ -138,9 +138,9 @@ export declare function notificationTaskComplete<D extends NotificationItemMetad
|
|
|
138
138
|
*
|
|
139
139
|
* After exceeding the maximum retry attempts, the task will be permanently deleted.
|
|
140
140
|
*
|
|
141
|
-
* @param updateMetadata -
|
|
142
|
-
* @param removeFromCompletedCheckpoints -
|
|
143
|
-
* @returns
|
|
141
|
+
* @param updateMetadata - Optional metadata updates.
|
|
142
|
+
* @param removeFromCompletedCheckpoints - Checkpoint(s) to remove from the completed set (e.g., to retry a checkpoint)
|
|
143
|
+
* @returns A task result signaling failure; the error attempt counter is incremented.
|
|
144
144
|
*
|
|
145
145
|
* @example
|
|
146
146
|
* ```ts
|
|
@@ -155,9 +155,9 @@ export declare function notificationTaskFailed<D extends NotificationItemMetadat
|
|
|
155
155
|
* By default, only sets `canRunNextCheckpoint` if it isn't already defined.
|
|
156
156
|
* Use `force: true` to override an existing value.
|
|
157
157
|
*
|
|
158
|
-
* @param result -
|
|
159
|
-
* @param force -
|
|
160
|
-
* @returns
|
|
158
|
+
* @param result - The task result to wrap.
|
|
159
|
+
* @param force - When true, overrides any existing `canRunNextCheckpoint` value.
|
|
160
|
+
* @returns A copy of the result with `canRunNextCheckpoint` set to true.
|
|
161
161
|
*/
|
|
162
162
|
export declare function notificationTaskCanRunNextCheckpoint<D extends NotificationItemMetadata = {}, S extends NotificationTaskCheckpointString = NotificationTaskCheckpointString>(result: NotificationTaskServiceHandleNotificationTaskResult<D, S>, force?: Maybe<boolean>): NotificationTaskServiceHandleNotificationTaskResult<D, S>;
|
|
163
163
|
/**
|
|
@@ -76,7 +76,7 @@ export type NotificationTaskSubtaskCheckpoint = typeof NOTIFICATION_TASK_SUBTASK
|
|
|
76
76
|
*
|
|
77
77
|
* Prefer using {@link notificationSubtaskComplete} in subtask handlers instead of calling this directly.
|
|
78
78
|
*
|
|
79
|
-
* @returns
|
|
79
|
+
* @returns A partially-complete task result with the processing checkpoint marked done.
|
|
80
80
|
*/
|
|
81
81
|
export declare function completeSubtaskProcessingAndScheduleCleanupTaskResult<D extends NotificationTaskSubtaskData>(): NotificationTaskServiceHandleNotificationTaskResult<D, NotificationTaskSubtaskCheckpoint>;
|
|
82
82
|
/**
|
|
@@ -85,8 +85,8 @@ export declare function completeSubtaskProcessingAndScheduleCleanupTaskResult<D
|
|
|
85
85
|
* Unlike {@link notificationTaskComplete}, this signals that the cleanup checkpoint should still run.
|
|
86
86
|
* Use `canRunNextCheckpoint: true` in options to run cleanup immediately in the same execution.
|
|
87
87
|
*
|
|
88
|
-
* @param options -
|
|
89
|
-
* @returns
|
|
88
|
+
* @param options - Optional metadata updates and flag to run cleanup immediately in the same execution.
|
|
89
|
+
* @returns A task result marking the subtask as complete while allowing cleanup to proceed.
|
|
90
90
|
*
|
|
91
91
|
* @example
|
|
92
92
|
* ```ts
|
|
@@ -29,8 +29,8 @@ export interface EffectiveNotificationBoxRecipientConfigInput {
|
|
|
29
29
|
* Filters template configs to only include types applicable to the notification box's model.
|
|
30
30
|
* Used during the server-side sync process to update box recipient entries from user configs.
|
|
31
31
|
*
|
|
32
|
-
* @param input -
|
|
33
|
-
* @returns
|
|
32
|
+
* @param input - The merged config inputs including uid, global config, box config, and optional existing recipient.
|
|
33
|
+
* @returns The computed effective box recipient with merged config, contact info, and flags.
|
|
34
34
|
*/
|
|
35
35
|
export declare function effectiveNotificationBoxRecipientConfig(input: EffectiveNotificationBoxRecipientConfigInput): NotificationBoxRecipient;
|
|
36
36
|
/**
|
|
@@ -51,8 +51,8 @@ export interface UpdateNotificationUserNotificationSendExclusionsResult {
|
|
|
51
51
|
*
|
|
52
52
|
* Exclusions not matching any associated notification box are automatically filtered out.
|
|
53
53
|
*
|
|
54
|
-
* @param input -
|
|
55
|
-
* @returns
|
|
54
|
+
* @param input - The user, exclusions to add, and exclusions to remove.
|
|
55
|
+
* @returns The updated exclusion list and the partial user update to apply.
|
|
56
56
|
*/
|
|
57
57
|
export declare function updateNotificationUserNotificationSendExclusions(input: UpdateNotificationUserNotificationSendExclusionsInput): UpdateNotificationUserNotificationSendExclusionsResult;
|
|
58
58
|
/**
|
|
@@ -69,15 +69,15 @@ export type ApplyExclusionsToNotificationUserNotificationBoxRecipientConfigsResu
|
|
|
69
69
|
* Applies the current exclusion list to per-box configs, setting/clearing the `x` flag and marking
|
|
70
70
|
* changed configs as needing sync (`ns = true`).
|
|
71
71
|
*
|
|
72
|
-
* @param params -
|
|
73
|
-
* @returns
|
|
72
|
+
* @param params - The exclusion list, per-box configs, and optional flag to recalculate the global ns flag.
|
|
73
|
+
* @returns The updated per-box configs and the recalculated needs-sync flag.
|
|
74
74
|
*/
|
|
75
75
|
export declare function applyExclusionsToNotificationUserNotificationBoxRecipientConfigs(params: ApplyExclusionsToNotificationUserNotificationBoxRecipientConfigsParams): ApplyExclusionsToNotificationUserNotificationBoxRecipientConfigsResult;
|
|
76
76
|
/**
|
|
77
77
|
* Returns true if any of the per-box configs need syncing (`ns == true`).
|
|
78
78
|
*
|
|
79
|
-
* @param configs -
|
|
80
|
-
* @returns
|
|
79
|
+
* @param configs - Array of per-box recipient configs to check.
|
|
80
|
+
* @returns True if at least one config has its needs-sync flag set.
|
|
81
81
|
*/
|
|
82
82
|
export declare function calculateNsForNotificationUserNotificationBoxRecipientConfigs(configs: NotificationUserNotificationBoxRecipientConfig[]): boolean;
|
|
83
83
|
/**
|
|
@@ -91,24 +91,24 @@ export type NotificationSendExclusionCanSendFunction = ((notification: Notificat
|
|
|
91
91
|
* Creates a {@link NotificationSendExclusionCanSendFunction} from the given exclusion list.
|
|
92
92
|
* Returns true for IDs that don't match any exclusion prefix.
|
|
93
93
|
*
|
|
94
|
-
* @param exclusions -
|
|
95
|
-
* @returns
|
|
94
|
+
* @param exclusions - The list of box IDs or prefixes that should be excluded from delivery.
|
|
95
|
+
* @returns A predicate function that returns true if the given notification/box ID is not excluded.
|
|
96
96
|
*/
|
|
97
97
|
export declare const notificationSendExclusionCanSendFunction: (exclusions: NotificationBoxSendExclusionList) => NotificationSendExclusionCanSendFunction;
|
|
98
98
|
/**
|
|
99
99
|
* Returns true if all channels on the notification have reached a terminal state
|
|
100
100
|
* (NONE, NO_TRY, SENT, or SKIPPED). Used to determine if the notification can be marked done.
|
|
101
101
|
*
|
|
102
|
-
* @param input -
|
|
103
|
-
* @returns
|
|
102
|
+
* @param input - The per-channel send flags to evaluate.
|
|
103
|
+
* @returns True if all channels are in a terminal send state.
|
|
104
104
|
*/
|
|
105
105
|
export declare function notificationSendFlagsImplyIsComplete(input: NotificationSendFlags): boolean;
|
|
106
106
|
/**
|
|
107
107
|
* Returns true if the given send state is terminal — no further send attempts will be made.
|
|
108
108
|
* Terminal states: NONE, NO_TRY, SENT, SKIPPED.
|
|
109
109
|
*
|
|
110
|
-
* @param input -
|
|
111
|
-
* @returns
|
|
110
|
+
* @param input - The send state to evaluate.
|
|
111
|
+
* @returns True if the state is terminal and no further delivery will be attempted.
|
|
112
112
|
*/
|
|
113
113
|
export declare function isCompleteNotificationSendState(input: NotificationSendState): boolean;
|
|
114
114
|
/**
|
|
@@ -122,8 +122,8 @@ export interface AllowedNotificationRecipients {
|
|
|
122
122
|
/**
|
|
123
123
|
* Resolves which recipient groups (global, box, explicit) are allowed based on the {@link NotificationRecipientSendFlag}.
|
|
124
124
|
*
|
|
125
|
-
* @param flag -
|
|
126
|
-
* @returns
|
|
125
|
+
* @param flag - The recipient send flag controlling which groups are included.
|
|
126
|
+
* @returns An object indicating which recipient groups are permitted for this notification.
|
|
127
127
|
*/
|
|
128
128
|
export declare function allowedNotificationRecipients(flag?: Maybe<NotificationRecipientSendFlag>): AllowedNotificationRecipients;
|
|
129
129
|
/**
|
|
@@ -132,8 +132,8 @@ export declare function allowedNotificationRecipients(flag?: Maybe<NotificationR
|
|
|
132
132
|
* Logged-event notifications bypass the normal send pipeline entirely and are archived to the
|
|
133
133
|
* day-keyed {@link NotificationLoggedEventDay} collection during cleanup.
|
|
134
134
|
*
|
|
135
|
-
* @param notification -
|
|
136
|
-
* @returns
|
|
135
|
+
* @param notification - The notification to check.
|
|
136
|
+
* @returns True if the notification has the LOGGED_EVENT send type.
|
|
137
137
|
*/
|
|
138
138
|
export declare function isLoggedEventNotification(notification: Pick<Notification, 'st'>): boolean;
|
|
139
139
|
/**
|
|
@@ -143,25 +143,25 @@ export declare function isLoggedEventNotification(notification: Pick<Notificatio
|
|
|
143
143
|
* to only explicit or only global recipients are not saved to the weekly archive). Logged-event
|
|
144
144
|
* notifications are archived to {@link NotificationLoggedEventDay} instead and never to the weekly archive.
|
|
145
145
|
*
|
|
146
|
-
* @param notification -
|
|
147
|
-
* @returns
|
|
146
|
+
* @param notification - The notification to check.
|
|
147
|
+
* @returns True if the notification should be saved to the weekly archive after delivery.
|
|
148
148
|
*/
|
|
149
149
|
export declare function shouldSaveNotificationToNotificationWeek(notification: Notification): boolean;
|
|
150
150
|
/**
|
|
151
151
|
* Merges a partial update into a {@link NotificationUserNotificationBoxRecipientConfig},
|
|
152
152
|
* preserving user-controlled fields (`nb`, `rm`, `ns`, `lk`, `bk`) and respecting OPT_OUT state.
|
|
153
153
|
*
|
|
154
|
-
* @param a -
|
|
155
|
-
* @param b -
|
|
156
|
-
* @returns
|
|
154
|
+
* @param a - Base user box recipient config to merge into.
|
|
155
|
+
* @param b - Partial update to apply on top of the base.
|
|
156
|
+
* @returns The merged config with protected fields retained from `a`
|
|
157
157
|
*/
|
|
158
158
|
export declare function mergeNotificationUserNotificationBoxRecipientConfigs(a: NotificationUserNotificationBoxRecipientConfig, b: Partial<NotificationUserNotificationBoxRecipientConfig>): NotificationUserNotificationBoxRecipientConfig;
|
|
159
159
|
/**
|
|
160
160
|
* Merges a partial update into a {@link NotificationBoxRecipient}, deeply merging the `c` (config record) field.
|
|
161
161
|
*
|
|
162
|
-
* @param a -
|
|
163
|
-
* @param b -
|
|
164
|
-
* @returns
|
|
162
|
+
* @param a - Base recipient to merge into.
|
|
163
|
+
* @param b - Partial recipient update to apply on top of the base.
|
|
164
|
+
* @returns The merged recipient with deeply merged template config records.
|
|
165
165
|
*/
|
|
166
166
|
export declare function mergeNotificationBoxRecipients<T extends NotificationBoxRecipient>(a: T, b: Partial<T>): T;
|
|
167
167
|
/**
|
|
@@ -182,9 +182,9 @@ export interface NotificationBoxDocumentReferencePair {
|
|
|
182
182
|
/**
|
|
183
183
|
* Resolves a {@link NotificationBoxDocument} from a reference pair, loading by model key if no document is provided directly.
|
|
184
184
|
*
|
|
185
|
-
* @param input -
|
|
186
|
-
* @param accessor - Firestore document accessor used to load the document by ID when needed
|
|
187
|
-
* @returns
|
|
185
|
+
* @param input - Reference pair containing either a direct document or a model key to load from.
|
|
186
|
+
* @param accessor - Firestore document accessor used to load the document by ID when needed.
|
|
187
|
+
* @returns The resolved NotificationBoxDocument.
|
|
188
188
|
* @throws {Error} When neither a document nor a model key is provided.
|
|
189
189
|
*/
|
|
190
190
|
export declare function loadNotificationBoxDocumentForReferencePair(input: NotificationBoxDocumentReferencePair, accessor: FirestoreDocumentAccessor<NotificationBox, NotificationBoxDocument>): NotificationBoxDocument;
|
|
@@ -101,7 +101,7 @@ export { targetModelParamsType as deleteOidcTokenParamsType } from '../../common
|
|
|
101
101
|
* Custom (non-CRUD) function type map for OIDC.
|
|
102
102
|
*/
|
|
103
103
|
export type OidcModelFunctionTypeMap = {};
|
|
104
|
-
export declare const
|
|
104
|
+
export declare const OIDC_FUNCTION_TYPE_CONFIG_MAP: FirebaseFunctionTypeConfigMap<OidcModelFunctionTypeMap>;
|
|
105
105
|
/**
|
|
106
106
|
* CRUD function configuration map for the OIDC client model.
|
|
107
107
|
*
|
|
@@ -122,7 +122,7 @@ export type OidcModelCrudFunctionsConfig = {
|
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
|
-
export declare const
|
|
125
|
+
export declare const OIDC_MODEL_CRUD_FUNCTIONS_CONFIG: ModelFirebaseCrudFunctionConfigMap<OidcModelCrudFunctionsConfig, OidcModelTypes>;
|
|
126
126
|
/**
|
|
127
127
|
* Abstract class defining all callable OIDC cloud functions.
|
|
128
128
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JsonSerializableObject, type Maybe } from '@dereekb/util';
|
|
1
|
+
import { type JsonSerializableObject, type SuggestedString, type Maybe } from '@dereekb/util';
|
|
2
2
|
import { AbstractFirestoreDocument, type CollectionReference, type FirestoreCollection, type FirestoreContext, type FirebaseAuthOwnershipKey, type FirebaseAuthUserId } from '../../common';
|
|
3
3
|
import { type GrantedDeleteRole, type GrantedReadRole, type GrantedUpdateRole } from '@dereekb/model';
|
|
4
4
|
/**
|
|
@@ -29,7 +29,7 @@ export declare const oidcEntryIdentity: import("../..").RootFirestoreModelIdenti
|
|
|
29
29
|
*
|
|
30
30
|
* Used as the discriminator in the {@link OidcEntry.type} field.
|
|
31
31
|
*/
|
|
32
|
-
export type OidcEntryType = 'Session' | 'AccessToken' | 'AuthorizationCode' | 'RefreshToken' | 'DeviceCode' | 'ClientCredentials' | 'Client' | 'InitialAccessToken' | 'RegistrationAccessToken' | 'Interaction' | 'ReplayDetection' | 'PushedAuthorizationRequest' | 'Grant' | 'BackchannelAuthenticationRequest'
|
|
32
|
+
export type OidcEntryType = SuggestedString<'Session' | 'AccessToken' | 'AuthorizationCode' | 'RefreshToken' | 'DeviceCode' | 'ClientCredentials' | 'Client' | 'InitialAccessToken' | 'RegistrationAccessToken' | 'Interaction' | 'ReplayDetection' | 'PushedAuthorizationRequest' | 'Grant' | 'BackchannelAuthenticationRequest'>;
|
|
33
33
|
/**
|
|
34
34
|
* Type value for Client adapter entries.
|
|
35
35
|
*/
|
|
@@ -146,14 +146,14 @@ export interface OidcEntryFirestoreCollectionConfig {
|
|
|
146
146
|
/**
|
|
147
147
|
* Returns the Firestore {@link CollectionReference} for {@link OidcEntry} documents.
|
|
148
148
|
*
|
|
149
|
-
* @param context -
|
|
150
|
-
* @returns
|
|
149
|
+
* @param context - The Firestore context to use.
|
|
150
|
+
* @returns The CollectionReference for OidcEntry documents.
|
|
151
151
|
*/
|
|
152
152
|
export declare function oidcEntryCollectionReference(context: FirestoreContext): CollectionReference<OidcEntry>;
|
|
153
153
|
/**
|
|
154
154
|
* Creates an {@link OidcEntryFirestoreCollection} from the given configuration.
|
|
155
155
|
*
|
|
156
|
-
* @param config -
|
|
157
|
-
* @returns
|
|
156
|
+
* @param config - The Firestore context and collection configuration.
|
|
157
|
+
* @returns A configured OidcEntryFirestoreCollection.
|
|
158
158
|
*/
|
|
159
159
|
export declare function oidcEntryFirestoreCollection(config: OidcEntryFirestoreCollectionConfig): OidcEntryFirestoreCollection;
|
|
@@ -3,47 +3,47 @@ import { type OidcEntryType } from './oidcmodel';
|
|
|
3
3
|
/**
|
|
4
4
|
* Query for OidcEntry documents with a specific type.
|
|
5
5
|
*
|
|
6
|
-
* @param type -
|
|
7
|
-
* @returns Firestore query constraints for the given type
|
|
6
|
+
* @param type - The OIDC entry type to filter by.
|
|
7
|
+
* @returns Firestore query constraints for the given type.
|
|
8
8
|
*/
|
|
9
9
|
export declare function oidcEntriesWithTypeQuery(type: OidcEntryType): FirestoreQueryConstraint[];
|
|
10
10
|
/**
|
|
11
11
|
* Query for OidcEntry documents with a specific type and userCode.
|
|
12
12
|
*
|
|
13
|
-
* @param type -
|
|
14
|
-
* @param userCode -
|
|
15
|
-
* @returns Firestore query constraints for the given type and userCode
|
|
13
|
+
* @param type - The OIDC entry type to filter by.
|
|
14
|
+
* @param userCode - The user code to match.
|
|
15
|
+
* @returns Firestore query constraints for the given type and userCode.
|
|
16
16
|
*/
|
|
17
17
|
export declare function oidcEntriesByUserCodeQuery(type: OidcEntryType, userCode: string): FirestoreQueryConstraint[];
|
|
18
18
|
/**
|
|
19
19
|
* Query for OidcEntry documents with a specific type and uid.
|
|
20
20
|
*
|
|
21
|
-
* @param type -
|
|
22
|
-
* @param uid -
|
|
23
|
-
* @returns Firestore query constraints for the given type and uid
|
|
21
|
+
* @param type - The OIDC entry type to filter by.
|
|
22
|
+
* @param uid - The Firebase user ID to match.
|
|
23
|
+
* @returns Firestore query constraints for the given type and uid.
|
|
24
24
|
*/
|
|
25
25
|
export declare function oidcEntriesByUidQuery(type: OidcEntryType, uid: FirebaseAuthUserId): FirestoreQueryConstraint[];
|
|
26
26
|
/**
|
|
27
27
|
* Query for OidcEntry documents with a specific type and grantId.
|
|
28
28
|
*
|
|
29
|
-
* @param type -
|
|
30
|
-
* @param grantId -
|
|
31
|
-
* @returns Firestore query constraints for the given type and grantId
|
|
29
|
+
* @param type - The OIDC entry type to filter by.
|
|
30
|
+
* @param grantId - The grant ID to match.
|
|
31
|
+
* @returns Firestore query constraints for the given type and grantId.
|
|
32
32
|
*/
|
|
33
33
|
export declare function oidcEntriesByGrantIdQuery(type: OidcEntryType, grantId: string): FirestoreQueryConstraint[];
|
|
34
34
|
/**
|
|
35
35
|
* Query for OidcEntry documents with a specific type and clientId.
|
|
36
36
|
*
|
|
37
|
-
* @param type -
|
|
38
|
-
* @param clientId -
|
|
39
|
-
* @returns Firestore query constraints for the given type and clientId
|
|
37
|
+
* @param type - The OIDC entry type to filter by.
|
|
38
|
+
* @param clientId - The OAuth client ID to match.
|
|
39
|
+
* @returns Firestore query constraints for the given type and clientId.
|
|
40
40
|
*/
|
|
41
41
|
export declare function oidcEntriesByClientIdQuery(type: OidcEntryType, clientId: string): FirestoreQueryConstraint[];
|
|
42
42
|
/**
|
|
43
43
|
* Query for OidcEntry Client documents owned by a specific user.
|
|
44
44
|
*
|
|
45
|
-
* @param ownershipKey -
|
|
46
|
-
* @returns Firestore query constraints for Client entries matching the ownership key
|
|
45
|
+
* @param ownershipKey - The ownership key identifying the owner.
|
|
46
|
+
* @returns Firestore query constraints for Client entries matching the ownership key.
|
|
47
47
|
*/
|
|
48
48
|
export declare function oidcClientEntriesByOwnerQuery(ownershipKey: FirebaseAuthOwnershipKey): FirestoreQueryConstraint[];
|
|
49
49
|
/**
|
|
@@ -52,7 +52,7 @@ export declare function oidcClientEntriesByOwnerQuery(ownershipKey: FirebaseAuth
|
|
|
52
52
|
* Used by the "apps with access to my account" UI to list every outstanding
|
|
53
53
|
* grant the signed-in user has authorized.
|
|
54
54
|
*
|
|
55
|
-
* @param uid -
|
|
56
|
-
* @returns Firestore query constraints for Grant entries matching the uid
|
|
55
|
+
* @param uid - The Firebase user id the grants were issued to.
|
|
56
|
+
* @returns Firestore query constraints for Grant entries matching the uid.
|
|
57
57
|
*/
|
|
58
58
|
export declare function oidcGrantEntriesByUidQuery(uid: FirebaseAuthUserId): FirestoreQueryConstraint[];
|
|
@@ -258,7 +258,7 @@ export interface InitializeAllApplicableStorageFileGroupsResult {
|
|
|
258
258
|
* Custom (non-CRUD) function type map for StorageFile. Currently empty — all operations use CRUD functions.
|
|
259
259
|
*/
|
|
260
260
|
export type StorageFileFunctionTypeMap = {};
|
|
261
|
-
export declare const
|
|
261
|
+
export declare const STORAGE_FILE_FUNCTION_TYPE_CONFIG_MAP: FirebaseFunctionTypeConfigMap<StorageFileFunctionTypeMap>;
|
|
262
262
|
/**
|
|
263
263
|
* CRUD function configuration map for the StorageFile model family.
|
|
264
264
|
*
|
|
@@ -295,7 +295,7 @@ export type StorageFileModelCrudFunctionsConfig = {
|
|
|
295
295
|
};
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
|
-
export declare const
|
|
298
|
+
export declare const STORAGE_FILE_MODEL_CRUD_FUNCTIONS_CONFIG: ModelFirebaseCrudFunctionConfigMap<StorageFileModelCrudFunctionsConfig, StorageFileTypes>;
|
|
299
299
|
/**
|
|
300
300
|
* Abstract class defining all callable StorageFile cloud functions.
|
|
301
301
|
*
|
|
@@ -170,11 +170,11 @@ export type CreateStorageFileDocumentPairFactory = <M extends StorageFileMetadat
|
|
|
170
170
|
* {@link StorageFileCreationType.FOR_STORAGE_FILE_GROUP}), storage path resolution, and
|
|
171
171
|
* initial state setup.
|
|
172
172
|
*
|
|
173
|
-
* @param config -
|
|
174
|
-
* @returns
|
|
175
|
-
* @throws {Error} When neither accessor nor context is provided
|
|
176
|
-
* @throws {Error} When no storage path can be resolved from the input
|
|
177
|
-
* @throws {Error} When FOR_STORAGE_FILE_GROUP is used without parentStorageFileGroup or purpose
|
|
173
|
+
* @param config - Optional defaults for creation type, subgroup, and processing state.
|
|
174
|
+
* @returns A factory function that creates StorageFile document pairs.
|
|
175
|
+
* @throws {Error} When neither accessor nor context is provided.
|
|
176
|
+
* @throws {Error} When no storage path can be resolved from the input.
|
|
177
|
+
* @throws {Error} When FOR_STORAGE_FILE_GROUP is used without parentStorageFileGroup or purpose.
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
180
180
|
* ```ts
|
|
@@ -188,6 +188,7 @@ export type CreateStorageFileDocumentPairFactory = <M extends StorageFileMetadat
|
|
|
188
188
|
* context: collections
|
|
189
189
|
* });
|
|
190
190
|
* ```
|
|
191
|
+
*
|
|
191
192
|
* @__NO_SIDE_EFFECTS__
|
|
192
193
|
*/
|
|
193
194
|
export declare function createStorageFileDocumentPairFactory(config?: CreateStorageFileDocumentPairFactoryConfig): CreateStorageFileDocumentPairFactory;
|
|
@@ -196,7 +197,7 @@ export declare function createStorageFileDocumentPairFactory(config?: CreateStor
|
|
|
196
197
|
*
|
|
197
198
|
* Calls createStorageFileDocumentPairFactory() with no arguments, then passes the input to the factory and returns the result.
|
|
198
199
|
*
|
|
199
|
-
* @param input -
|
|
200
|
-
* @returns
|
|
200
|
+
* @param input - Creation input specifying the storage path, purpose, and context.
|
|
201
|
+
* @returns Resolves with the created StorageFileDocument and StorageFile data.
|
|
201
202
|
*/
|
|
202
203
|
export declare function createStorageFileDocumentPair<M extends StorageFileMetadata = StorageFileMetadata>(input: CreateStorageFileDocumentPairInput<M>): Promise<CreateStorageFileDocumentPairResult<M>>;
|