@dereekb/firebase 12.6.21 → 13.0.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/LICENSE +1 -1
- package/index.cjs.js +53 -2239
- package/index.esm.js +34 -2216
- package/package.json +21 -15
- package/src/lib/client/storage/driver.accessor.d.ts +1 -1
- package/src/lib/common/firestore/query/iterator.d.ts +0 -4
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +0 -6
- package/src/lib/common/model/model.service.d.ts +1 -1
- package/src/lib/common/storage/driver/accessor.d.ts +1 -1
- package/src/lib/common/storage/types.d.ts +3 -3
- package/src/lib/model/notification/notification.api.d.ts +1 -1
- package/src/lib/model/notification/notification.config.d.ts +5 -5
- package/src/lib/model/notification/notification.d.ts +15 -15
- package/src/lib/model/notification/notification.details.d.ts +0 -4
- package/src/lib/model/notification/notification.item.d.ts +1 -1
- package/src/lib/model/storagefile/storagefile.api.d.ts +4 -4
- package/src/lib/model/storagefile/storagefile.d.ts +7 -7
- package/src/lib/model/storagefile/storagefile.task.d.ts +1 -13
- package/src/lib/model/system/system.d.ts +2 -2
- package/test/index.cjs.js +4043 -0
- package/test/index.esm.js +3957 -0
- package/test/package.json +27 -9
- package/test/src/lib/client/firebase.authorized.d.ts +2 -2
- package/test/src/lib/client/firebase.d.ts +4 -3
- package/test/src/lib/client/firestore.mock.item.fixture.authorized.d.ts +2 -2
- package/test/src/lib/common/firebase.instance.d.ts +7 -3
- package/test/src/lib/common/firestore/firestore.instance.d.ts +7 -3
- package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +5 -2
- package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +4 -4
- package/test/src/lib/common/storage/storage.instance.d.ts +7 -3
- package/test/CHANGELOG.md +0 -2114
- package/test/README.md +0 -11
- package/test/src/index.js +0 -5
- package/test/src/index.js.map +0 -1
- package/test/src/lib/client/firebase.authorized.js +0 -35
- package/test/src/lib/client/firebase.authorized.js.map +0 -1
- package/test/src/lib/client/firebase.js +0 -125
- package/test/src/lib/client/firebase.js.map +0 -1
- package/test/src/lib/client/firestore.mock.item.fixture.authorized.js +0 -19
- package/test/src/lib/client/firestore.mock.item.fixture.authorized.js.map +0 -1
- package/test/src/lib/client/index.js +0 -7
- package/test/src/lib/client/index.js.map +0 -1
- package/test/src/lib/common/firebase.instance.js +0 -35
- package/test/src/lib/common/firebase.instance.js.map +0 -1
- package/test/src/lib/common/firestore/firestore.instance.js +0 -24
- package/test/src/lib/common/firestore/firestore.instance.js.map +0 -1
- package/test/src/lib/common/firestore/firestore.js +0 -67
- package/test/src/lib/common/firestore/firestore.js.map +0 -1
- package/test/src/lib/common/firestore/index.js +0 -9
- package/test/src/lib/common/firestore/index.js.map +0 -1
- package/test/src/lib/common/firestore/test.driver.accessor.js +0 -767
- package/test/src/lib/common/firestore/test.driver.accessor.js.map +0 -1
- package/test/src/lib/common/firestore/test.driver.query.js +0 -1361
- package/test/src/lib/common/firestore/test.driver.query.js.map +0 -1
- package/test/src/lib/common/firestore/test.iterator.js +0 -221
- package/test/src/lib/common/firestore/test.iterator.js.map +0 -1
- package/test/src/lib/common/index.js +0 -8
- package/test/src/lib/common/index.js.map +0 -1
- package/test/src/lib/common/mock/index.js +0 -10
- package/test/src/lib/common/mock/index.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.collection.fixture.js +0 -64
- package/test/src/lib/common/mock/mock.item.collection.fixture.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.id.js +0 -3
- package/test/src/lib/common/mock/mock.item.id.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.js +0 -339
- package/test/src/lib/common/mock/mock.item.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.query.js +0 -33
- package/test/src/lib/common/mock/mock.item.query.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.service.js +0 -77
- package/test/src/lib/common/mock/mock.item.service.js.map +0 -1
- package/test/src/lib/common/mock/mock.item.storage.fixture.js +0 -40
- package/test/src/lib/common/mock/mock.item.storage.fixture.js.map +0 -1
- package/test/src/lib/common/storage/index.js +0 -7
- package/test/src/lib/common/storage/index.js.map +0 -1
- package/test/src/lib/common/storage/storage.instance.js +0 -24
- package/test/src/lib/common/storage/storage.instance.js.map +0 -1
- package/test/src/lib/common/storage/storage.js +0 -37
- package/test/src/lib/common/storage/storage.js.map +0 -1
- package/test/src/lib/common/storage/test.driver.accessor.js +0 -669
- package/test/src/lib/common/storage/test.driver.accessor.js.map +0 -1
- package/test/src/lib/index.js +0 -6
- package/test/src/lib/index.js.map +0 -1
- /package/{index.cjs.d.ts → index.d.ts} +0 -0
- /package/{index.esm.d.ts → test/index.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -15,25 +15,31 @@
|
|
|
15
15
|
},
|
|
16
16
|
"./test": {
|
|
17
17
|
"types": "./test/src/index.d.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
18
|
+
"module": "./test/index.esm.js",
|
|
19
|
+
"main": "./test/index.cjs.js",
|
|
20
|
+
"node": {
|
|
21
|
+
"require": "./test/index.cjs.js"
|
|
22
|
+
},
|
|
23
|
+
"browser": {
|
|
24
|
+
"require": "./test/index.cjs.js",
|
|
25
|
+
"import": "./test/index.esm.js"
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
29
|
"peerDependencies": {
|
|
24
|
-
"@dereekb/util": "
|
|
25
|
-
"@dereekb/rxjs": "
|
|
26
|
-
"@dereekb/model": "
|
|
27
|
-
"@dereekb/date": "
|
|
28
|
-
"rxjs": "^7.
|
|
29
|
-
"firebase": "^
|
|
30
|
+
"@dereekb/util": "13.0.0",
|
|
31
|
+
"@dereekb/rxjs": "13.0.0",
|
|
32
|
+
"@dereekb/model": "13.0.0",
|
|
33
|
+
"@dereekb/date": "13.0.0",
|
|
34
|
+
"rxjs": "^7.8.0",
|
|
35
|
+
"firebase": "^12.0.0",
|
|
30
36
|
"class-transformer": "^0.5.1",
|
|
31
|
-
"class-validator": "^0.
|
|
32
|
-
"ts-essentials": "^
|
|
33
|
-
"date-fns": "^
|
|
37
|
+
"class-validator": "^0.15.1",
|
|
38
|
+
"ts-essentials": "^10.0.0",
|
|
39
|
+
"date-fns": "^4.0.0",
|
|
40
|
+
"core-js": "^3.0.0"
|
|
34
41
|
},
|
|
35
|
-
"dependencies": {},
|
|
36
42
|
"module": "./index.esm.js",
|
|
37
43
|
"main": "./index.cjs.js",
|
|
38
|
-
"types": "./index.
|
|
44
|
+
"types": "./index.d.ts"
|
|
39
45
|
}
|
|
@@ -12,6 +12,6 @@ export interface FirebaseStorageClientListResult {
|
|
|
12
12
|
listResult: ListResult;
|
|
13
13
|
options?: StorageListFilesOptions;
|
|
14
14
|
}
|
|
15
|
-
export declare const firebaseStorageClientListFilesResultFactory: import("
|
|
15
|
+
export declare const firebaseStorageClientListFilesResultFactory: import("../..").StorageListFilesResultFactory<ClientFirebaseStorage, FirebaseStorageClientListResult>;
|
|
16
16
|
export declare function firebaseStorageClientAccessorFolder(storage: ClientFirebaseStorage, storagePath: StoragePath): FirebaseStorageClientAccessorFolder;
|
|
17
17
|
export declare function firebaseStorageClientAccessorDriver(): FirebaseStorageAccessorDriver;
|
|
@@ -294,7 +294,3 @@ export interface FirestoreFixedItemPageIterationConfig<T> extends FirestoreItemP
|
|
|
294
294
|
* Creates a FirestoreItemPageIterationInstance that iterates over the fixed
|
|
295
295
|
*/
|
|
296
296
|
export declare function firestoreFixedItemPageIteration<T>(config: FirestoreFixedItemPageIterationConfig<T>): FirestoreItemPageIterationInstance<T>;
|
|
297
|
-
/**
|
|
298
|
-
* @deprecated Use filterDisallowedFirestoreItemPageIteratorInputConstraints instead. Mispelling.
|
|
299
|
-
*/
|
|
300
|
-
export declare const filterDisallowedFirestoreItemPageIteratorInputContraints: typeof filterDisallowedFirestoreItemPageIteratorInputConstraints;
|
|
@@ -135,12 +135,6 @@ export interface OptionalOneTypeFirestoreFieldConfig<T> extends OptionalFirestor
|
|
|
135
135
|
* This is ignored if defaultReadValue is not set or if dontStoreIf is provided.
|
|
136
136
|
*/
|
|
137
137
|
readonly dontStoreDefaultReadValue?: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Removes the value from the object if the stored value would equal this value.
|
|
140
|
-
*
|
|
141
|
-
* @deprecated use dontStoreIf instead.
|
|
142
|
-
*/
|
|
143
|
-
readonly dontStoreIfValue?: T;
|
|
144
138
|
}
|
|
145
139
|
/**
|
|
146
140
|
* Configuration for optional Firestore fields with different types and transformations.
|
|
@@ -78,4 +78,4 @@ export type UseFirebaseModelsServiceSelectionResult<Y extends FirebaseModelsServ
|
|
|
78
78
|
export type UseFirebaseModelsServiceSelectionUseFunction<Y extends FirebaseModelsService<any, any>, T extends FirebaseModelsServiceTypes<Y>, O> = Y extends FirebaseModelsService<infer X, infer C> ? (T extends keyof X ? (X[T] extends FirebaseModelServiceGetter<C, infer T, infer D, infer R> ? UseAsync<ContextGrantedModelRolesReader<C, T, D, R>, O> : never) : never) : never;
|
|
79
79
|
export declare function selectFromFirebaseModelsService<Y extends FirebaseModelsService<any, any>, T extends FirebaseModelsServiceTypes<Y>>(service: Y, type: T, select: FirebaseModelsServiceSelection<Y, T>): FirebaseModelsServiceSelectionResult<Y, T>;
|
|
80
80
|
export declare function useFirebaseModelsService<Y extends FirebaseModelsService<any, any>, T extends FirebaseModelsServiceTypes<Y>>(service: Y, type: T, select: UseFirebaseModelsServiceSelection<Y, T>): UseFirebaseModelsServiceSelectionResult<Y, T>;
|
|
81
|
-
export declare function buildFirebaseCollectionTypeModelTypeMap<Y extends FirebaseModelsService<any, any>>(inContextFirebaseModelsService: InContextFirebaseModelsService<Y>): import("
|
|
81
|
+
export declare function buildFirebaseCollectionTypeModelTypeMap<Y extends FirebaseModelsService<any, any>>(inContextFirebaseModelsService: InContextFirebaseModelsService<Y>): import("..").FirestoreModelIdentityTypeMap;
|
|
@@ -53,7 +53,7 @@ export interface FirebaseStorageAccessorFile<R = unknown> extends StoragePathRef
|
|
|
53
53
|
/**
|
|
54
54
|
* Downloads the data as an ArrayBuffer.
|
|
55
55
|
*/
|
|
56
|
-
getBytes(maxDownloadSizeBytes?: number): Promise<
|
|
56
|
+
getBytes(maxDownloadSizeBytes?: number): Promise<Uint8Array<ArrayBufferLike>>;
|
|
57
57
|
/**
|
|
58
58
|
* Downloads the data as a Blob.
|
|
59
59
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ArrayOrValue, type
|
|
1
|
+
import { type ArrayOrValue, type DateOrUnixDateTimeMillisecondsNumber, type FileSize, type Milliseconds, type MimeTypeWithoutParameters, type ISO8601DateString, type Maybe, type ContentDispositionString, type ContentTypeMimeType } from '@dereekb/util';
|
|
2
2
|
import { type Observable } from 'rxjs';
|
|
3
3
|
export type FirebaseStorageLikeStorage = {
|
|
4
4
|
/**
|
|
@@ -50,11 +50,11 @@ export interface StorageSignedDownloadUrlConfig {
|
|
|
50
50
|
*
|
|
51
51
|
* Defaults to one hour if not specified.
|
|
52
52
|
*/
|
|
53
|
-
readonly expiresAt?: string |
|
|
53
|
+
readonly expiresAt?: string | DateOrUnixDateTimeMillisecondsNumber;
|
|
54
54
|
/**
|
|
55
55
|
* The time the url will become accessible.
|
|
56
56
|
*/
|
|
57
|
-
readonly accessibleAt?: string |
|
|
57
|
+
readonly accessibleAt?: string | DateOrUnixDateTimeMillisecondsNumber;
|
|
58
58
|
readonly version?: 'v2' | 'v4';
|
|
59
59
|
readonly virtualHostedStyle?: boolean;
|
|
60
60
|
readonly cname?: string;
|
|
@@ -497,4 +497,4 @@ export declare abstract class NotificationFunctions implements ModelFirebaseFunc
|
|
|
497
497
|
};
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
export declare const notificationFunctionMap: import("
|
|
500
|
+
export declare const notificationFunctionMap: import("../..").ModelFirebaseFunctionMapFactory<NotificationFunctionTypeMap, NotificationBoxModelCrudFunctionsConfig>;
|
|
@@ -60,7 +60,7 @@ export interface NotificationRecipient {
|
|
|
60
60
|
export declare function updateNotificationRecipient(a: NotificationRecipient, b: Partial<NotificationRecipient>): NotificationRecipient;
|
|
61
61
|
export interface NotificationRecipientWithConfig extends NotificationRecipient, NotificationBoxRecipientTemplateConfig {
|
|
62
62
|
}
|
|
63
|
-
export declare const firestoreNotificationRecipientWithConfig: import("
|
|
63
|
+
export declare const firestoreNotificationRecipientWithConfig: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<NotificationRecipientWithConfig, Partial<import("@dereekb/util").ReplaceType<NotificationRecipientWithConfig, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
64
64
|
export declare enum NotificationBoxRecipientFlag {
|
|
65
65
|
/**
|
|
66
66
|
* The recipient is enabled.
|
|
@@ -192,10 +192,10 @@ export declare function mergeNotificationBoxRecipientTemplateConfigRecords(a: No
|
|
|
192
192
|
* Encoded NotificationBoxRecipientTemplateConfigRecord
|
|
193
193
|
*/
|
|
194
194
|
export type EncodedNotificationBoxRecipientTemplateConfigRecord = Record<NotificationTemplateType, EncodedNotificationBoxRecipientTemplateConfig>;
|
|
195
|
-
export declare function firestoreNotificationBoxRecipientTemplateConfigRecord(): import("
|
|
196
|
-
export declare const firestoreNotificationBoxRecipient: import("
|
|
197
|
-
export declare const firestoreNotificationUserDefaultNotificationBoxRecipientConfig: import("
|
|
198
|
-
export declare const firestoreNotificationUserNotificationBoxRecipientConfig: import("
|
|
195
|
+
export declare function firestoreNotificationBoxRecipientTemplateConfigRecord(): import("../..").FirestoreModelFieldMapFunctionsConfig<import("../..").FirestoreEncodedObjectMapFieldValueType<NotificationBoxRecipientTemplateConfig, string>, import("../..").FirestoreMapFieldType<number, string>>;
|
|
196
|
+
export declare const firestoreNotificationBoxRecipient: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<NotificationBoxRecipient, Partial<import("@dereekb/util").ReplaceType<NotificationBoxRecipient, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
197
|
+
export declare const firestoreNotificationUserDefaultNotificationBoxRecipientConfig: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<NotificationUserDefaultNotificationBoxRecipientConfig, Partial<import("@dereekb/util").ReplaceType<NotificationUserDefaultNotificationBoxRecipientConfig, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
198
|
+
export declare const firestoreNotificationUserNotificationBoxRecipientConfig: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<NotificationUserNotificationBoxRecipientConfig, Partial<import("@dereekb/util").ReplaceType<NotificationUserNotificationBoxRecipientConfig, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
199
199
|
export interface NotificationBoxRecipientTemplateConfigArrayEntry extends NotificationBoxRecipientTemplateConfig {
|
|
200
200
|
/**
|
|
201
201
|
* Array entry template type
|
|
@@ -37,7 +37,7 @@ export interface InitializedNotificationModel {
|
|
|
37
37
|
*/
|
|
38
38
|
fi?: Maybe<SavedToFirestoreIfTrue>;
|
|
39
39
|
}
|
|
40
|
-
export declare const notificationUserIdentity: import("
|
|
40
|
+
export declare const notificationUserIdentity: import("../..").RootFirestoreModelIdentity<"notificationUser", "nu">;
|
|
41
41
|
/**
|
|
42
42
|
* A global notification User in the system.
|
|
43
43
|
*
|
|
@@ -86,16 +86,16 @@ export interface NotificationUser extends UserRelated, UserRelatedById {
|
|
|
86
86
|
}
|
|
87
87
|
export type NotificationUserRoles = 'sync' | GrantedUpdateRole | GrantedReadRole;
|
|
88
88
|
export declare class NotificationUserDocument extends AbstractFirestoreDocument<NotificationUser, NotificationUserDocument, typeof notificationUserIdentity> {
|
|
89
|
-
get modelIdentity(): import("
|
|
89
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"notificationUser", "nu">;
|
|
90
90
|
}
|
|
91
|
-
export declare const notificationUserConverter: import("
|
|
91
|
+
export declare const notificationUserConverter: import("../..").SnapshotConverterFunctions<NotificationUser, Partial<import("@dereekb/util").ReplaceType<NotificationUser, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
92
92
|
export declare function notificationUserCollectionReference(context: FirestoreContext): CollectionReference<NotificationUser>;
|
|
93
93
|
export type NotificationUserFirestoreCollection = FirestoreCollection<NotificationUser, NotificationUserDocument>;
|
|
94
94
|
export declare function notificationUserFirestoreCollection(firestoreContext: FirestoreContext): NotificationUserFirestoreCollection;
|
|
95
95
|
/**
|
|
96
96
|
* An arbitrary summary object
|
|
97
97
|
*/
|
|
98
|
-
export declare const notificationSummaryIdentity: import("
|
|
98
|
+
export declare const notificationSummaryIdentity: import("../..").RootFirestoreModelIdentity<"notificationSummary", "ns">;
|
|
99
99
|
/**
|
|
100
100
|
* The maximum number of notifications that can be stored in a NotificationSummary.
|
|
101
101
|
*/
|
|
@@ -152,13 +152,13 @@ export interface NotificationSummary extends InitializedNotificationModel {
|
|
|
152
152
|
*/
|
|
153
153
|
export type NotificationSummaryRoles = GrantedReadRole;
|
|
154
154
|
export declare class NotificationSummaryDocument extends AbstractFirestoreDocument<NotificationSummary, NotificationSummaryDocument, typeof notificationSummaryIdentity> {
|
|
155
|
-
get modelIdentity(): import("
|
|
155
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"notificationSummary", "ns">;
|
|
156
156
|
}
|
|
157
|
-
export declare const notificationSummaryConverter: import("
|
|
157
|
+
export declare const notificationSummaryConverter: import("../..").SnapshotConverterFunctions<NotificationSummary, Partial<import("@dereekb/util").ReplaceType<NotificationSummary, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
158
158
|
export declare function notificationSummaryCollectionReference(context: FirestoreContext): CollectionReference<NotificationSummary>;
|
|
159
159
|
export type NotificationSummaryFirestoreCollection = FirestoreCollection<NotificationSummary, NotificationSummaryDocument>;
|
|
160
160
|
export declare function notificationSummaryFirestoreCollection(firestoreContext: FirestoreContext): NotificationSummaryFirestoreCollection;
|
|
161
|
-
export declare const notificationBoxIdentity: import("
|
|
161
|
+
export declare const notificationBoxIdentity: import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">;
|
|
162
162
|
/**
|
|
163
163
|
* A Notification Box in the system for an object. The id for this is the two-way flat key of the object it represents.
|
|
164
164
|
*
|
|
@@ -215,14 +215,14 @@ export interface NotificationBox extends InitializedNotificationModel {
|
|
|
215
215
|
*/
|
|
216
216
|
export type NotificationBoxRoles = 'subscribe' | 'manageRecipients' | 'createNotification' | GrantedReadRole | GrantedUpdateRole;
|
|
217
217
|
export declare class NotificationBoxDocument extends AbstractFirestoreDocument<NotificationBox, NotificationBoxDocument, typeof notificationBoxIdentity> {
|
|
218
|
-
get modelIdentity(): import("
|
|
218
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">;
|
|
219
219
|
get notificationBoxRelatedModelKey(): string;
|
|
220
220
|
}
|
|
221
|
-
export declare const notificationBoxConverter: import("
|
|
221
|
+
export declare const notificationBoxConverter: import("../..").SnapshotConverterFunctions<NotificationBox, Partial<import("@dereekb/util").ReplaceType<NotificationBox, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
222
222
|
export declare function notificationBoxCollectionReference(context: FirestoreContext): CollectionReference<NotificationBox>;
|
|
223
223
|
export type NotificationBoxFirestoreCollection = FirestoreCollection<NotificationBox, NotificationBoxDocument>;
|
|
224
224
|
export declare function notificationBoxFirestoreCollection(firestoreContext: FirestoreContext): NotificationBoxFirestoreCollection;
|
|
225
|
-
export declare const notificationIdentity: import("
|
|
225
|
+
export declare const notificationIdentity: import("../..").FirestoreModelIdentityWithParent<import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">, "notification", "nbn">;
|
|
226
226
|
export declare enum NotificationSendType {
|
|
227
227
|
/**
|
|
228
228
|
* Sends only if the NotificationBox exists.
|
|
@@ -433,9 +433,9 @@ export interface Notification extends NotificationSendFlags, NotificationSendChe
|
|
|
433
433
|
export type NotificationSendRole = 'send';
|
|
434
434
|
export type NotificationRoles = GrantedReadRole | GrantedUpdateRole | NotificationSendRole;
|
|
435
435
|
export declare class NotificationDocument extends AbstractFirestoreDocumentWithParent<NotificationBox, Notification, NotificationDocument, typeof notificationIdentity> {
|
|
436
|
-
get modelIdentity(): import("
|
|
436
|
+
get modelIdentity(): import("../..").FirestoreModelIdentityWithParent<import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">, "notification", "nbn">;
|
|
437
437
|
}
|
|
438
|
-
export declare const notificationConverter: import("
|
|
438
|
+
export declare const notificationConverter: import("../..").SnapshotConverterFunctions<Notification, Partial<import("@dereekb/util").ReplaceType<Notification, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
439
439
|
export declare function notificationCollectionReferenceFactory(context: FirestoreContext): (notificationBox: NotificationBoxDocument) => CollectionReference<Notification>;
|
|
440
440
|
export type NotificationFirestoreCollection = FirestoreCollectionWithParent<Notification, NotificationBox, NotificationDocument, NotificationBoxDocument>;
|
|
441
441
|
export type NotificationFirestoreCollectionFactory = (parent: NotificationBoxDocument) => NotificationFirestoreCollection;
|
|
@@ -443,7 +443,7 @@ export declare function notificationFirestoreCollectionFactory(firestoreContext:
|
|
|
443
443
|
export declare function notificationCollectionReference(context: FirestoreContext): CollectionGroup<Notification>;
|
|
444
444
|
export type NotificationFirestoreCollectionGroup = FirestoreCollectionGroup<Notification, NotificationDocument>;
|
|
445
445
|
export declare function notificationFirestoreCollectionGroup(firestoreContext: FirestoreContext): NotificationFirestoreCollectionGroup;
|
|
446
|
-
export declare const notificationWeekIdentity: import("
|
|
446
|
+
export declare const notificationWeekIdentity: import("../..").FirestoreModelIdentityWithParent<import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">, "notificationWeek", "nbnw">;
|
|
447
447
|
/**
|
|
448
448
|
* The maximum number of notifications that can be stored in a NotificationWeek.
|
|
449
449
|
*/
|
|
@@ -463,9 +463,9 @@ export interface NotificationWeek {
|
|
|
463
463
|
}
|
|
464
464
|
export type NotificationWeekRoles = GrantedReadRole;
|
|
465
465
|
export declare class NotificationWeekDocument extends AbstractFirestoreDocumentWithParent<NotificationBox, NotificationWeek, NotificationWeekDocument, typeof notificationWeekIdentity> {
|
|
466
|
-
get modelIdentity(): import("
|
|
466
|
+
get modelIdentity(): import("../..").FirestoreModelIdentityWithParent<import("../..").RootFirestoreModelIdentity<"notificationBox", "nb">, "notificationWeek", "nbnw">;
|
|
467
467
|
}
|
|
468
|
-
export declare const notificationWeekConverter: import("
|
|
468
|
+
export declare const notificationWeekConverter: import("../..").SnapshotConverterFunctions<NotificationWeek, Partial<import("@dereekb/util").ReplaceType<NotificationWeek, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
469
469
|
export declare function notificationWeekCollectionReferenceFactory(context: FirestoreContext): (notificationBox: NotificationBoxDocument) => CollectionReference<NotificationWeek>;
|
|
470
470
|
export type NotificationWeekFirestoreCollection = FirestoreCollectionWithParent<NotificationWeek, NotificationBox, NotificationWeekDocument, NotificationBoxDocument>;
|
|
471
471
|
export type NotificationWeekFirestoreCollectionFactory = (parent: NotificationBoxDocument) => NotificationWeekFirestoreCollection;
|
|
@@ -148,7 +148,3 @@ export declare abstract class AppNotificationTemplateTypeInfoRecordService {
|
|
|
148
148
|
abstract getTemplateTypeInfosForTargetModelIdentity(identity: FirestoreModelIdentity): NotificationTemplateTypeInfo[];
|
|
149
149
|
}
|
|
150
150
|
export declare function appNotificationTemplateTypeInfoRecordService(appNotificationTemplateTypeInfoRecord: NotificationTemplateTypeInfoRecord): AppNotificationTemplateTypeInfoRecordService;
|
|
151
|
-
/**
|
|
152
|
-
* @deprecated use notificationTemplateTypeInfoRecord instead.
|
|
153
|
-
*/
|
|
154
|
-
export declare const notificationTemplateTypeDetailsRecord: typeof notificationTemplateTypeInfoRecord;
|
|
@@ -56,7 +56,7 @@ export interface NotificationItem<D extends NotificationItemMetadata = {}> {
|
|
|
56
56
|
*/
|
|
57
57
|
v?: Maybe<SavedToFirestoreIfTrue>;
|
|
58
58
|
}
|
|
59
|
-
export declare const firestoreNotificationItem: import("
|
|
59
|
+
export declare const firestoreNotificationItem: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<NotificationItem<{}>, Partial<import("@dereekb/util").ReplaceType<NotificationItem<{}>, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
60
60
|
export interface UnreadNotificationItemsResult<D extends NotificationItemMetadata = {}> {
|
|
61
61
|
readonly items: NotificationItem<D>[];
|
|
62
62
|
readonly considerReadIfCreatedBefore?: Maybe<Date>;
|
|
@@ -2,9 +2,9 @@ import { TargetModelParams, OnCallCreateModelResult, FirestoreModelKey } from '.
|
|
|
2
2
|
import { type ModelFirebaseCrudFunction, type FirebaseFunctionTypeConfigMap, type ModelFirebaseCrudFunctionConfigMap, type ModelFirebaseFunctionMap, ModelFirebaseCreateFunction } from '../../client';
|
|
3
3
|
import { StorageFileSignedDownloadUrl, StorageFileTypes } from './storagefile';
|
|
4
4
|
import { type StorageBucketId, type StoragePath, type StorageSlashPath } from '../../common/storage';
|
|
5
|
-
import { ContentDispositionString, ContentTypeMimeType, Maybe, Milliseconds, UnixDateTimeSecondsNumber } from '@dereekb/util';
|
|
6
|
-
import { StorageFileId } from './storagefile.id';
|
|
7
|
-
import { SendNotificationResult } from '../notification/notification.api';
|
|
5
|
+
import { type ContentDispositionString, type ContentTypeMimeType, type Maybe, type Milliseconds, type UnixDateTimeSecondsNumber } from '@dereekb/util';
|
|
6
|
+
import { type StorageFileId } from './storagefile.id';
|
|
7
|
+
import { type SendNotificationResult } from '../notification/notification.api';
|
|
8
8
|
/**
|
|
9
9
|
* Used for directly create a new StorageFile.
|
|
10
10
|
*/
|
|
@@ -332,4 +332,4 @@ export declare abstract class StorageFileFunctions implements ModelFirebaseFunct
|
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
export declare const storageFileFunctionMap: import("
|
|
335
|
+
export declare const storageFileFunctionMap: import("../..").ModelFirebaseFunctionMapFactory<StorageFileFunctionTypeMap, StorageFileModelCrudFunctionsConfig>;
|
|
@@ -29,7 +29,7 @@ export interface InitializedStorageFileModel {
|
|
|
29
29
|
*/
|
|
30
30
|
fi?: Maybe<SavedToFirestoreIfTrue>;
|
|
31
31
|
}
|
|
32
|
-
export declare const storageFileIdentity: import("
|
|
32
|
+
export declare const storageFileIdentity: import("../..").RootFirestoreModelIdentity<"storageFile", "sf">;
|
|
33
33
|
/**
|
|
34
34
|
* The key for a StorageFile that is generated/related to a StorageFileGroup.
|
|
35
35
|
*
|
|
@@ -301,13 +301,13 @@ export interface StorageFile<M extends StorageFileMetadata = StorageFileMetadata
|
|
|
301
301
|
export type StorageFileDownloadRole = 'download' | 'admin_download';
|
|
302
302
|
export type StorageFileRoles = StorageFileDownloadRole | 'forceSyncWithGroups' | 'syncWithGroups' | 'process' | GrantedUpdateRole | GrantedReadRole;
|
|
303
303
|
export declare class StorageFileDocument extends AbstractFirestoreDocument<StorageFile, StorageFileDocument, typeof storageFileIdentity> {
|
|
304
|
-
get modelIdentity(): import("
|
|
304
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"storageFile", "sf">;
|
|
305
305
|
}
|
|
306
|
-
export declare const storageFileConverter: import("
|
|
306
|
+
export declare const storageFileConverter: import("../..").SnapshotConverterFunctions<StorageFile<Readonly<Record<string, any>>>, Partial<import("@dereekb/util").ReplaceType<StorageFile<Readonly<Record<string, any>>>, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
307
307
|
export declare function storageFileCollectionReference(context: FirestoreContext): CollectionReference<StorageFile>;
|
|
308
308
|
export type StorageFileFirestoreCollection = FirestoreCollection<StorageFile, StorageFileDocument>;
|
|
309
309
|
export declare function storageFileFirestoreCollection(firestoreContext: FirestoreContext): StorageFileFirestoreCollection;
|
|
310
|
-
export declare const storageFileGroupIdentity: import("
|
|
310
|
+
export declare const storageFileGroupIdentity: import("../..").RootFirestoreModelIdentity<"storageFileGroup", "sfg">;
|
|
311
311
|
/**
|
|
312
312
|
* Current embedded state
|
|
313
313
|
*/
|
|
@@ -330,7 +330,7 @@ export interface StorageFileGroupEmbeddedFile {
|
|
|
330
330
|
*/
|
|
331
331
|
zat?: Maybe<Date>;
|
|
332
332
|
}
|
|
333
|
-
export declare const storageFileGroupEmbeddedFile: import("
|
|
333
|
+
export declare const storageFileGroupEmbeddedFile: import("../..").FirestoreSubObjectFieldMapFunctionsConfig<StorageFileGroupEmbeddedFile, Partial<import("@dereekb/util").ReplaceType<StorageFileGroupEmbeddedFile, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
334
334
|
/**
|
|
335
335
|
* A group of StorageFiles.
|
|
336
336
|
*
|
|
@@ -377,10 +377,10 @@ export interface StorageFileGroup extends InitializedStorageFileModel {
|
|
|
377
377
|
export type StorageFileGroupContentFlagsData = Pick<StorageFileGroup, 'z'>;
|
|
378
378
|
export type StorageFileGroupRoles = 'regenerate' | GrantedReadRole;
|
|
379
379
|
export declare class StorageFileGroupDocument extends AbstractFirestoreDocument<StorageFileGroup, StorageFileGroupDocument, typeof storageFileGroupIdentity> {
|
|
380
|
-
get modelIdentity(): import("
|
|
380
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"storageFileGroup", "sfg">;
|
|
381
381
|
get storageFileGroupRelatedModelKey(): string;
|
|
382
382
|
}
|
|
383
|
-
export declare const storageFileGroupConverter: import("
|
|
383
|
+
export declare const storageFileGroupConverter: import("../..").SnapshotConverterFunctions<StorageFileGroup, Partial<import("@dereekb/util").ReplaceType<StorageFileGroup, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
384
384
|
export declare function storageFileGroupCollectionReference(context: FirestoreContext): CollectionReference<StorageFileGroup>;
|
|
385
385
|
export type StorageFileGroupFirestoreCollection = FirestoreCollection<StorageFileGroup, StorageFileGroupDocument>;
|
|
386
386
|
export declare function storageFileGroupFirestoreCollection(firestoreContext: FirestoreContext): StorageFileGroupFirestoreCollection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Maybe } from '@dereekb/util';
|
|
2
2
|
import { type CreateNotificationTaskTemplate } from '../notification/notification.create.task';
|
|
3
|
-
import { type
|
|
3
|
+
import { type NotificationTaskSubtaskCheckpointString, type NotificationTaskSubtaskData, type NotificationTaskSubtaskMetadata } from '../notification/notification.task.subtask';
|
|
4
4
|
import { type NotificationTaskType } from '../notification/notification.id';
|
|
5
5
|
import { type StorageFileDocument } from './storagefile';
|
|
6
6
|
import { type StorageFileId, type StorageFilePurpose } from './storagefile.id';
|
|
@@ -42,15 +42,3 @@ export interface StorageFileProcessingNotificationTaskInput<M extends StorageFil
|
|
|
42
42
|
}
|
|
43
43
|
export declare function storageFileProcessingNotificationTaskTemplate(input: StorageFileProcessingNotificationTaskInput): CreateNotificationTaskTemplate;
|
|
44
44
|
export declare const ALL_STORAGE_FILE_NOTIFICATION_TASK_TYPES: NotificationTaskType[];
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated Use NotificationTaskSubtaskCheckpoint instead.
|
|
47
|
-
*/
|
|
48
|
-
export type StorageFileProcessingNotificationTaskCheckpoint = NotificationTaskSubtaskCheckpoint;
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated Use NOTIFICATION_TASK_SUBTASK_CHECKPOINT_PROCESSING instead.
|
|
51
|
-
*/
|
|
52
|
-
export declare const STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_CHECKPOINT_PROCESSING: StorageFileProcessingNotificationTaskCheckpoint;
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated Use NOTIFICATION_TASK_SUBTASK_CHECKPOINT_CLEANUP instead.
|
|
55
|
-
*/
|
|
56
|
-
export declare const STORAGE_FILE_PROCESSING_NOTIFICATION_TASK_CHECKPOINT_CLEANUP: StorageFileProcessingNotificationTaskCheckpoint;
|
|
@@ -8,7 +8,7 @@ export declare abstract class SystemStateFirestoreCollections {
|
|
|
8
8
|
abstract readonly systemStateCollection: SystemStateFirestoreCollection;
|
|
9
9
|
}
|
|
10
10
|
export type SystemStateTypes = typeof systemStateIdentity;
|
|
11
|
-
export declare const systemStateIdentity: import("
|
|
11
|
+
export declare const systemStateIdentity: import("../..").RootFirestoreModelIdentity<"systemState", "sys">;
|
|
12
12
|
/**
|
|
13
13
|
* Used to identify a SystemStateId.
|
|
14
14
|
*/
|
|
@@ -34,7 +34,7 @@ export type SystemStateRoles = GrantedSysAdminRole;
|
|
|
34
34
|
* Refers to a singleton SystemState based on this model's identifier.
|
|
35
35
|
*/
|
|
36
36
|
export declare class SystemStateDocument<T extends SystemStateStoredData = SystemStateStoredData> extends AbstractFirestoreDocument<SystemState<T>, SystemStateDocument<T>, typeof systemStateIdentity> {
|
|
37
|
-
get modelIdentity(): import("
|
|
37
|
+
get modelIdentity(): import("../..").RootFirestoreModelIdentity<"systemState", "sys">;
|
|
38
38
|
}
|
|
39
39
|
export declare const systemStateConverter: import("../..").SnapshotConverterFunctions<SystemState<SystemStateStoredData>, Partial<import("@dereekb/util").ReplaceType<SystemState<SystemStateStoredData>, import("@dereekb/util").MaybeMap<object>, any>>>;
|
|
40
40
|
export declare function systemStateCollectionReference(context: FirestoreContext): CollectionReference<SystemState>;
|