@dereekb/firebase 14.7.0 → 14.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint/package.json +3 -3
- package/index.esm.js +6 -15
- package/package.json +5 -5
- package/src/lib/model/formspace/formspace.query.d.ts +4 -10
- package/src/lib/model/notification/notification.api.d.ts +10 -0
- package/src/lib/model/storagefile/storagefile.api.d.ts +43 -0
- package/test/package.json +6 -6
package/eslint/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase/eslint",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@dereekb/util": "14.
|
|
7
|
+
"@dereekb/util": "14.9.0",
|
|
8
8
|
"@marcbachmann/cel-js": "^8.0.0",
|
|
9
9
|
"@typescript-eslint/parser": "8.69.0",
|
|
10
10
|
"@typescript-eslint/utils": "8.69.0",
|
|
11
11
|
"typescript": "6.0.3"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@dereekb/firebase": "14.
|
|
14
|
+
"@dereekb/firebase": "14.9.0",
|
|
15
15
|
"eslint": "10.9.1",
|
|
16
16
|
"firebase": "^12.18.0"
|
|
17
17
|
},
|
package/index.esm.js
CHANGED
|
@@ -19327,7 +19327,6 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
19327
19327
|
* This is the backstop sweep: submission normally creates the task inline, so a space that is still sitting
|
|
19328
19328
|
* here is one whose task creation was lost.
|
|
19329
19329
|
*
|
|
19330
|
-
* @param limitCount - Maximum number of results. Omit for unbounded.
|
|
19331
19330
|
* @returns Firestore query constraints for FormSpaces queued for processing.
|
|
19332
19331
|
*
|
|
19333
19332
|
* @dbxModelFirebaseIndex
|
|
@@ -19337,16 +19336,12 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
19337
19336
|
*
|
|
19338
19337
|
* @example
|
|
19339
19338
|
* ```ts
|
|
19340
|
-
* const constraints = formSpacesQueuedForProcessingQuery(
|
|
19339
|
+
* const constraints = formSpacesQueuedForProcessingQuery();
|
|
19341
19340
|
* ```
|
|
19342
|
-
*/ function formSpacesQueuedForProcessingQuery(
|
|
19343
|
-
|
|
19341
|
+
*/ function formSpacesQueuedForProcessingQuery() {
|
|
19342
|
+
return [
|
|
19344
19343
|
where('ps', '==', FormSpaceProcessingState.QUEUED_FOR_PROCESSING)
|
|
19345
19344
|
];
|
|
19346
|
-
if (limitCount != null) {
|
|
19347
|
-
constraints.push(limit(limitCount));
|
|
19348
|
-
}
|
|
19349
|
-
return constraints;
|
|
19350
19345
|
}
|
|
19351
19346
|
/**
|
|
19352
19347
|
* Returns query constraints for FormSpaces whose expiration instant has arrived.
|
|
@@ -19355,7 +19350,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
19355
19350
|
* whose type does not expire, or one that has already been submitted or expired and had `eat` cleared — is
|
|
19356
19351
|
* not matched. That absence IS the exclusion mechanism; there is no second flag to keep in step.
|
|
19357
19352
|
*
|
|
19358
|
-
* @param input - The pinned cutoff
|
|
19353
|
+
* @param input - The pinned cutoff.
|
|
19359
19354
|
* @returns Firestore query constraints for FormSpaces due for expiration.
|
|
19360
19355
|
*
|
|
19361
19356
|
* @dbxModelFirebaseIndex
|
|
@@ -19365,17 +19360,13 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
19365
19360
|
*
|
|
19366
19361
|
* @example
|
|
19367
19362
|
* ```ts
|
|
19368
|
-
* const constraints = formSpacesDueForExpirationQuery({ before: new Date()
|
|
19363
|
+
* const constraints = formSpacesDueForExpirationQuery({ before: new Date() });
|
|
19369
19364
|
* ```
|
|
19370
19365
|
*/ function formSpacesDueForExpirationQuery(input) {
|
|
19371
|
-
|
|
19366
|
+
return [
|
|
19372
19367
|
orderBy('eat', 'asc'),
|
|
19373
19368
|
whereDateIsOnOrBefore('eat', input.before)
|
|
19374
19369
|
];
|
|
19375
|
-
if (input.limit != null) {
|
|
19376
|
-
constraints.push(limit(input.limit));
|
|
19377
|
-
}
|
|
19378
|
-
return constraints;
|
|
19379
19370
|
}
|
|
19380
19371
|
/**
|
|
19381
19372
|
* Returns query constraints for every StorageFile that belongs to a FormSpace.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@dereekb/date": "14.
|
|
26
|
-
"@dereekb/model": "14.
|
|
27
|
-
"@dereekb/rxjs": "14.
|
|
28
|
-
"@dereekb/util": "14.
|
|
25
|
+
"@dereekb/date": "14.9.0",
|
|
26
|
+
"@dereekb/model": "14.9.0",
|
|
27
|
+
"@dereekb/rxjs": "14.9.0",
|
|
28
|
+
"@dereekb/util": "14.9.0",
|
|
29
29
|
"@firebase/rules-unit-testing": "5.0.2",
|
|
30
30
|
"@marcbachmann/cel-js": "^8.0.0",
|
|
31
31
|
"@typescript-eslint/parser": "8.69.0",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Maybe } from '@dereekb/util';
|
|
2
1
|
import { type FirestoreQueryConstraint } from '../../common/firestore/query/constraint';
|
|
3
2
|
import { type FirebaseAuthOwnershipKey } from '../../common/auth/auth';
|
|
4
3
|
import { type FormSpaceKey } from './formspace.id';
|
|
@@ -16,7 +15,6 @@ import { type FormSpaceKey } from './formspace.id';
|
|
|
16
15
|
* This is the backstop sweep: submission normally creates the task inline, so a space that is still sitting
|
|
17
16
|
* here is one whose task creation was lost.
|
|
18
17
|
*
|
|
19
|
-
* @param limitCount - Maximum number of results. Omit for unbounded.
|
|
20
18
|
* @returns Firestore query constraints for FormSpaces queued for processing.
|
|
21
19
|
*
|
|
22
20
|
* @dbxModelFirebaseIndex
|
|
@@ -26,10 +24,10 @@ import { type FormSpaceKey } from './formspace.id';
|
|
|
26
24
|
*
|
|
27
25
|
* @example
|
|
28
26
|
* ```ts
|
|
29
|
-
* const constraints = formSpacesQueuedForProcessingQuery(
|
|
27
|
+
* const constraints = formSpacesQueuedForProcessingQuery();
|
|
30
28
|
* ```
|
|
31
29
|
*/
|
|
32
|
-
export declare function formSpacesQueuedForProcessingQuery(
|
|
30
|
+
export declare function formSpacesQueuedForProcessingQuery(): FirestoreQueryConstraint[];
|
|
33
31
|
/**
|
|
34
32
|
* Input for {@link formSpacesDueForExpirationQuery}.
|
|
35
33
|
*/
|
|
@@ -41,10 +39,6 @@ export interface FormSpacesDueForExpirationQueryInput {
|
|
|
41
39
|
* clock lets a space that ages mid-sweep join a page not yet reached, making the pass unbounded.
|
|
42
40
|
*/
|
|
43
41
|
readonly before: Date;
|
|
44
|
-
/**
|
|
45
|
-
* Maximum number of results per page.
|
|
46
|
-
*/
|
|
47
|
-
readonly limit?: Maybe<number>;
|
|
48
42
|
}
|
|
49
43
|
/**
|
|
50
44
|
* Returns query constraints for FormSpaces whose expiration instant has arrived.
|
|
@@ -53,7 +47,7 @@ export interface FormSpacesDueForExpirationQueryInput {
|
|
|
53
47
|
* whose type does not expire, or one that has already been submitted or expired and had `eat` cleared — is
|
|
54
48
|
* not matched. That absence IS the exclusion mechanism; there is no second flag to keep in step.
|
|
55
49
|
*
|
|
56
|
-
* @param input - The pinned cutoff
|
|
50
|
+
* @param input - The pinned cutoff.
|
|
57
51
|
* @returns Firestore query constraints for FormSpaces due for expiration.
|
|
58
52
|
*
|
|
59
53
|
* @dbxModelFirebaseIndex
|
|
@@ -63,7 +57,7 @@ export interface FormSpacesDueForExpirationQueryInput {
|
|
|
63
57
|
*
|
|
64
58
|
* @example
|
|
65
59
|
* ```ts
|
|
66
|
-
* const constraints = formSpacesDueForExpirationQuery({ before: new Date()
|
|
60
|
+
* const constraints = formSpacesDueForExpirationQuery({ before: new Date() });
|
|
67
61
|
* ```
|
|
68
62
|
*/
|
|
69
63
|
export declare function formSpacesDueForExpirationQuery(input: FormSpacesDueForExpirationQueryInput): FirestoreQueryConstraint[];
|
|
@@ -84,6 +84,8 @@ export interface UpdateNotificationUserNotificationBoxRecipientParams extends Up
|
|
|
84
84
|
export declare const updateNotificationUserNotificationBoxRecipientParamsType: Type<UpdateNotificationUserNotificationBoxRecipientParams>;
|
|
85
85
|
/**
|
|
86
86
|
* Used for updating the NotificationUser.
|
|
87
|
+
*
|
|
88
|
+
* @dbxModelApiParams
|
|
87
89
|
*/
|
|
88
90
|
export interface UpdateNotificationUserParams extends TargetModelParams {
|
|
89
91
|
readonly gc?: Maybe<UpdateNotificationUserDefaultNotificationBoxRecipientConfigParams>;
|
|
@@ -102,6 +104,8 @@ export interface ResyncNotificationUserResult {
|
|
|
102
104
|
* The check always inspects the user's configuration, their notification box subscriptions, and whatever
|
|
103
105
|
* read-only diagnostics each configured delivery method's send service offers. Actually dispatching a
|
|
104
106
|
* test message is opt-in via `sendProbe`, since that delivers real mail/SMS to the user.
|
|
107
|
+
*
|
|
108
|
+
* @dbxModelApiParams
|
|
105
109
|
*/
|
|
106
110
|
export interface NotificationUserHealthCheckParams extends TargetModelParams {
|
|
107
111
|
/**
|
|
@@ -206,6 +210,8 @@ export interface CreateNotificationSummaryParams {
|
|
|
206
210
|
export declare const createNotificationSummaryParamsType: Type<CreateNotificationSummaryParams>;
|
|
207
211
|
/**
|
|
208
212
|
* Used for updating the NotificationSummary.
|
|
213
|
+
*
|
|
214
|
+
* @dbxModelApiParams
|
|
209
215
|
*/
|
|
210
216
|
export interface UpdateNotificationSummaryParams extends TargetModelParams {
|
|
211
217
|
readonly flagAllRead?: Maybe<boolean>;
|
|
@@ -255,6 +261,8 @@ export type UpdateNotificationBoxParams = TargetModelParams;
|
|
|
255
261
|
export { targetModelParamsType as updateNotificationBoxParamsType } from '../../common/model/model/model.param';
|
|
256
262
|
/**
|
|
257
263
|
* Used to create/update a notification box recipient.
|
|
264
|
+
*
|
|
265
|
+
* @dbxModelApiParams
|
|
258
266
|
*/
|
|
259
267
|
export interface UpdateNotificationBoxRecipientParams extends UpdateNotificationBoxRecipientLikeParams, TargetModelParams {
|
|
260
268
|
readonly key: FirestoreModelKey;
|
|
@@ -275,6 +283,8 @@ export interface NotificationRecipientParams {
|
|
|
275
283
|
export declare const notificationRecipientParamsType: Type<NotificationRecipientParams>;
|
|
276
284
|
/**
|
|
277
285
|
* Used for sending the notification immediately, if it has not already been sent.
|
|
286
|
+
*
|
|
287
|
+
* @dbxModelApiParams
|
|
278
288
|
*/
|
|
279
289
|
export interface SendNotificationParams extends TargetModelParams {
|
|
280
290
|
readonly ignoreSendAtThrottle?: Maybe<boolean>;
|
|
@@ -13,6 +13,8 @@ export declare const DOWNLOAD_MULTIPLE_STORAGE_FILES_MAX_FILES = 50;
|
|
|
13
13
|
* Parameters for directly creating a new StorageFile document (no upload initialization).
|
|
14
14
|
*
|
|
15
15
|
* Typically used server-side or for testing. Validated with {@link createStorageFileParamsType}.
|
|
16
|
+
*
|
|
17
|
+
* @dbxModelApiParams
|
|
16
18
|
*/
|
|
17
19
|
export interface CreateStorageFileParams {
|
|
18
20
|
}
|
|
@@ -22,6 +24,8 @@ export declare const createStorageFileParamsType: Type<CreateStorageFileParams>;
|
|
|
22
24
|
*
|
|
23
25
|
* Scans the uploads folder (or a custom path) and runs the upload determination/initialization
|
|
24
26
|
* pipeline for each file found. Validated with {@link initializeAllStorageFilesFromUploadsParamsType}.
|
|
27
|
+
*
|
|
28
|
+
* @dbxModelApiParams
|
|
25
29
|
*/
|
|
26
30
|
export interface InitializeAllStorageFilesFromUploadsParams {
|
|
27
31
|
readonly maxFilesToInitialize?: Maybe<number>;
|
|
@@ -50,6 +54,8 @@ export interface InitializeAllStorageFilesFromUploadsResult extends OnCallCreate
|
|
|
50
54
|
*
|
|
51
55
|
* The file is run through the upload type determination pipeline and, if matched,
|
|
52
56
|
* creates a corresponding StorageFile document. Validated with {@link initializeStorageFileFromUploadParamsType}.
|
|
57
|
+
*
|
|
58
|
+
* @dbxModelApiParams
|
|
53
59
|
*/
|
|
54
60
|
export interface InitializeStorageFileFromUploadParams extends Pick<StoragePath, 'pathString'> {
|
|
55
61
|
readonly bucketId?: Maybe<StorageBucketId>;
|
|
@@ -67,6 +73,8 @@ export declare const initializeStorageFileFromUploadParamsType: Type<InitializeS
|
|
|
67
73
|
* those flags. `ARCHIVED` and `DO_NOT_PROCESS` files cannot be processed at all.
|
|
68
74
|
*
|
|
69
75
|
* Validated with {@link processStorageFileParamsType}.
|
|
76
|
+
*
|
|
77
|
+
* @dbxModelApiParams
|
|
70
78
|
*/
|
|
71
79
|
export interface ProcessStorageFileParams extends TargetModelParams {
|
|
72
80
|
/**
|
|
@@ -106,10 +114,20 @@ export interface ProcessAllQueuedStorageFilesResult {
|
|
|
106
114
|
readonly storageFilesProcessStarted: number;
|
|
107
115
|
readonly storageFilesFailedStarting: number;
|
|
108
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Parameters for updating a StorageFile.
|
|
119
|
+
*
|
|
120
|
+
* @dbxModelApiParams
|
|
121
|
+
*/
|
|
109
122
|
export interface UpdateStorageFileParams extends TargetModelParams {
|
|
110
123
|
readonly sdat?: Maybe<Date>;
|
|
111
124
|
}
|
|
112
125
|
export declare const updateStorageFileParamsType: Type<UpdateStorageFileParams>;
|
|
126
|
+
/**
|
|
127
|
+
* Parameters for deleting a StorageFile.
|
|
128
|
+
*
|
|
129
|
+
* @dbxModelApiParams
|
|
130
|
+
*/
|
|
113
131
|
export interface DeleteStorageFileParams extends TargetModelParams {
|
|
114
132
|
readonly force?: Maybe<boolean>;
|
|
115
133
|
}
|
|
@@ -143,6 +161,8 @@ export interface DownloadStorageFileOptions {
|
|
|
143
161
|
*
|
|
144
162
|
* Extends {@link DownloadStorageFileOptions} with target model key.
|
|
145
163
|
* Validated with {@link downloadStorageFileParamsType}.
|
|
164
|
+
*
|
|
165
|
+
* @dbxModelApiParams
|
|
146
166
|
*/
|
|
147
167
|
export interface DownloadStorageFileParams extends TargetModelParams, DownloadStorageFileOptions {
|
|
148
168
|
}
|
|
@@ -198,6 +218,8 @@ export interface DownloadMultipleStorageFileErrorItem {
|
|
|
198
218
|
* ]
|
|
199
219
|
* };
|
|
200
220
|
* ```
|
|
221
|
+
*
|
|
222
|
+
* @dbxModelApiParams
|
|
201
223
|
*/
|
|
202
224
|
export interface DownloadMultipleStorageFilesParams extends DownloadStorageFileOptions {
|
|
203
225
|
readonly files: DownloadMultipleStorageFilesFileParams[];
|
|
@@ -223,6 +245,8 @@ export interface DownloadMultipleStorageFilesResult {
|
|
|
223
245
|
* Unlike {@link DownloadStorageFileParams}, no signed URL is minted — only the object's
|
|
224
246
|
* {@link StorageMetadata} (size, md5Hash, generation, content headers, custom metadata, etc.) is returned.
|
|
225
247
|
* `asAdmin` only selects the read role used for permission gating. Validated with {@link readStorageFileMetadataParamsType}.
|
|
248
|
+
*
|
|
249
|
+
* @dbxModelApiParams
|
|
226
250
|
*/
|
|
227
251
|
export interface ReadStorageFileMetadataParams extends TargetModelParams {
|
|
228
252
|
readonly asAdmin?: Maybe<boolean>;
|
|
@@ -265,6 +289,8 @@ export interface ReadMultipleStorageFileMetadataErrorItem {
|
|
|
265
289
|
* Parameters for batch-reading the Cloud Storage metadata of multiple StorageFiles.
|
|
266
290
|
*
|
|
267
291
|
* `asAdmin` selects the read role for the whole batch. Validated with {@link readMultipleStorageFilesMetadataParamsType}.
|
|
292
|
+
*
|
|
293
|
+
* @dbxModelApiParams
|
|
268
294
|
*/
|
|
269
295
|
export interface ReadMultipleStorageFilesMetadataParams {
|
|
270
296
|
readonly files: ReadMultipleStorageFilesMetadataFileParams[];
|
|
@@ -317,6 +343,8 @@ export declare const CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH =
|
|
|
317
343
|
* `/uploads/u/{uid}/...` namespace. Once uploaded, the existing
|
|
318
344
|
* `StorageFileInitializeFromUploadService` flow picks the file up and creates
|
|
319
345
|
* the matching `StorageFile` document.
|
|
346
|
+
*
|
|
347
|
+
* @dbxModelApiParams
|
|
320
348
|
*/
|
|
321
349
|
export interface CreateStorageFileSignedUploadUrlParams {
|
|
322
350
|
/**
|
|
@@ -416,6 +444,11 @@ export interface CreateStorageFileGroupParams {
|
|
|
416
444
|
readonly storageFileId?: Maybe<StorageFileId>;
|
|
417
445
|
}
|
|
418
446
|
export declare const createStorageFileGroupParamsType: Type<CreateStorageFileGroupParams>;
|
|
447
|
+
/**
|
|
448
|
+
* Parameters for syncing a StorageFile with its StorageFileGroups.
|
|
449
|
+
*
|
|
450
|
+
* @dbxModelApiParams
|
|
451
|
+
*/
|
|
419
452
|
export interface SyncStorageFileWithGroupsParams extends TargetModelParams {
|
|
420
453
|
readonly force?: Maybe<boolean>;
|
|
421
454
|
}
|
|
@@ -437,10 +470,20 @@ export interface UpdateStorageFileGroupEntryParams {
|
|
|
437
470
|
readonly n?: Maybe<string>;
|
|
438
471
|
}
|
|
439
472
|
export declare const updateStorageFileGroupEntryParamsType: Type<UpdateStorageFileGroupEntryParams>;
|
|
473
|
+
/**
|
|
474
|
+
* Parameters for updating a StorageFileGroup.
|
|
475
|
+
*
|
|
476
|
+
* @dbxModelApiParams
|
|
477
|
+
*/
|
|
440
478
|
export interface UpdateStorageFileGroupParams extends TargetModelParams {
|
|
441
479
|
readonly entries?: Maybe<UpdateStorageFileGroupEntryParams[]>;
|
|
442
480
|
}
|
|
443
481
|
export declare const updateStorageFileGroupParamsType: Type<UpdateStorageFileGroupParams>;
|
|
482
|
+
/**
|
|
483
|
+
* Parameters for regenerating a StorageFileGroup's content.
|
|
484
|
+
*
|
|
485
|
+
* @dbxModelApiParams
|
|
486
|
+
*/
|
|
444
487
|
export interface RegenerateStorageFileGroupContentParams extends TargetModelParams {
|
|
445
488
|
readonly force?: Maybe<boolean>;
|
|
446
489
|
}
|
package/test/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase/test",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@dereekb/date": "14.
|
|
8
|
-
"@dereekb/firebase": "14.
|
|
9
|
-
"@dereekb/model": "14.
|
|
10
|
-
"@dereekb/rxjs": "14.
|
|
11
|
-
"@dereekb/util": "14.
|
|
7
|
+
"@dereekb/date": "14.9.0",
|
|
8
|
+
"@dereekb/firebase": "14.9.0",
|
|
9
|
+
"@dereekb/model": "14.9.0",
|
|
10
|
+
"@dereekb/rxjs": "14.9.0",
|
|
11
|
+
"@dereekb/util": "14.9.0",
|
|
12
12
|
"@firebase/rules-unit-testing": "5.0.2",
|
|
13
13
|
"date-fns": "^4.1.0",
|
|
14
14
|
"firebase": "^12.18.0",
|