@dereekb/firebase 10.0.19 → 10.0.20
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/package.json +1 -1
- package/src/lib/client/firestore/driver.query.d.ts +2 -2
- package/src/lib/client/function/development.function.d.ts +2 -2
- package/src/lib/client/function/function.callable.d.ts +2 -2
- package/src/lib/client/function/function.d.ts +2 -2
- package/src/lib/client/function/function.factory.d.ts +5 -5
- package/src/lib/client/function/model.function.factory.d.ts +5 -5
- package/src/lib/common/auth/auth.d.ts +21 -9
- package/src/lib/common/auth/auth.error.d.ts +3 -3
- package/src/lib/common/firestore/accessor/accessor.d.ts +2 -2
- package/src/lib/common/firestore/accessor/converter.d.ts +1 -1
- package/src/lib/common/firestore/collection/collection.key.d.ts +8 -8
- package/src/lib/common/firestore/query/constraint.d.ts +15 -15
- package/src/lib/common/firestore/query/iterator.d.ts +3 -3
- package/src/lib/common/firestore/query/query.util.d.ts +3 -3
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +9 -9
- package/src/lib/common/model/model/model.loader.d.ts +2 -2
- package/src/lib/common/storage/accessor/path.model.d.ts +1 -1
- package/src/lib/common/storage/context.d.ts +2 -2
- package/src/lib/common/storage/driver/accessor.d.ts +5 -5
- package/src/lib/common/storage/driver/driver.d.ts +2 -2
- package/src/lib/common/storage/storage.d.ts +4 -4
- package/src/lib/common/storage/types.d.ts +25 -25
- package/test/CHANGELOG.md +4 -0
- package/test/package.json +1 -1
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@ import { type FullFirestoreQueryConstraintHandlersMapping } from './../../common
|
|
|
4
4
|
import { type FirestoreQueryConstraintFunctionsDriver, type FirestoreQueryDriver } from '../../common/firestore/driver/query';
|
|
5
5
|
import { type Query } from '../../common/firestore/types';
|
|
6
6
|
export interface FirebaseFirestoreQueryBuilder {
|
|
7
|
-
query: Query;
|
|
8
|
-
constraints: QueryConstraint[];
|
|
7
|
+
readonly query: Query;
|
|
8
|
+
readonly constraints: QueryConstraint[];
|
|
9
9
|
}
|
|
10
10
|
export declare function addConstraintToBuilder(builder: FirebaseFirestoreQueryBuilder, constraint: ArrayOrValue<QueryConstraint>): FirebaseFirestoreQueryBuilder;
|
|
11
11
|
export declare const FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING: FullFirestoreQueryConstraintHandlersMapping<FirebaseFirestoreQueryBuilder>;
|
|
@@ -8,7 +8,7 @@ export declare const FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY = "developmentFuncti
|
|
|
8
8
|
* Base map of all development functions enabled by the server.
|
|
9
9
|
*/
|
|
10
10
|
export type FirebaseDevelopmentFunctionTypeMap = {
|
|
11
|
-
scheduledFunction: [ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult];
|
|
11
|
+
readonly scheduledFunction: [ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Base DevelopmentFirebaseFunctionMap for all development functions enabled by the server (via firebaseServerDevFunctions())
|
|
@@ -16,5 +16,5 @@ export type FirebaseDevelopmentFunctionTypeMap = {
|
|
|
16
16
|
* Is used by dbx-firebase
|
|
17
17
|
*/
|
|
18
18
|
export declare abstract class FirebaseDevelopmentFunctions {
|
|
19
|
-
abstract scheduledFunction: FirebaseFunction<ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult>;
|
|
19
|
+
abstract readonly scheduledFunction: FirebaseFunction<ScheduledFunctionDevelopmentFirebaseFunctionParams, ScheduledFunctionDevelopmentFirebaseFunctionResult>;
|
|
20
20
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type FactoryWithInput, type Maybe, type PromiseOrValue } from '@dereekb/util';
|
|
2
2
|
import { type HttpsCallable } from 'firebase/functions';
|
|
3
3
|
export interface MapHttpsCallable<I, O, A, B> {
|
|
4
|
-
mapInput?: FactoryWithInput<PromiseOrValue<A>, Maybe<I>>;
|
|
5
|
-
mapOutput?: FactoryWithInput<PromiseOrValue<O>, Maybe<B>>;
|
|
4
|
+
readonly mapInput?: FactoryWithInput<PromiseOrValue<A>, Maybe<I>>;
|
|
5
|
+
readonly mapOutput?: FactoryWithInput<PromiseOrValue<O>, Maybe<B>>;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Maps input and output values when using HttpsCallable.
|
|
@@ -14,13 +14,13 @@ export type FirebaseFunction<I = unknown, O = unknown> = (input: I) => Promise<O
|
|
|
14
14
|
* Type with keys corresponding to functions on the corresponding server for a client.
|
|
15
15
|
*/
|
|
16
16
|
export type FirebaseFunctionTypeMap = {
|
|
17
|
-
[key: FirebaseFunctionKey]: FirebaseFunctionType;
|
|
17
|
+
readonly [key: FirebaseFunctionKey]: FirebaseFunctionType;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* A FirebaseFunction map. Its types are relative to a FirebaseFunctionTypeMap.
|
|
21
21
|
*/
|
|
22
22
|
export type FirebaseFunctionMap<M extends FirebaseFunctionTypeMap> = {
|
|
23
|
-
[K in keyof M]: FirebaseFunctionMapFunction<M, K>;
|
|
23
|
+
readonly [K in keyof M]: FirebaseFunctionMapFunction<M, K>;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Typings for a function within a FirebaseFunctionMap.
|
|
@@ -2,10 +2,10 @@ import { type ClassLikeType, type Getter, type Maybe } from '@dereekb/util';
|
|
|
2
2
|
import { type Functions, type HttpsCallableOptions } from 'firebase/functions';
|
|
3
3
|
import { type FirebaseFunctionMap, type FirebaseFunctionTypeMap } from './function';
|
|
4
4
|
export interface FirebaseFunctionTypeConfig {
|
|
5
|
-
options?: HttpsCallableOptions;
|
|
5
|
+
readonly options?: HttpsCallableOptions;
|
|
6
6
|
}
|
|
7
7
|
export type FirebaseFunctionTypeConfigMap<M extends FirebaseFunctionTypeMap> = {
|
|
8
|
-
[K in keyof M]: Maybe<FirebaseFunctionTypeConfig>;
|
|
8
|
+
readonly [K in keyof M]: Maybe<FirebaseFunctionTypeConfig>;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Used for building a FirebaseFunctionMap<M> for a specific Functions instance.
|
|
@@ -21,10 +21,10 @@ export type FirebaseFunctionGetter<T> = Getter<T> & {
|
|
|
21
21
|
* Map of all firebase functions in the app.
|
|
22
22
|
*/
|
|
23
23
|
export type FirebaseFunctionsMap = {
|
|
24
|
-
[key: FirebaseFunctionMapKey]: FirebaseFunctionTypeMap;
|
|
24
|
+
readonly [key: FirebaseFunctionMapKey]: FirebaseFunctionTypeMap;
|
|
25
25
|
};
|
|
26
26
|
export type FirebaseFunctionsConfigMap<M extends FirebaseFunctionsMap> = {
|
|
27
|
-
[K in keyof M]: FirebaseFunctionsConfigMapEntry<M[K]>;
|
|
27
|
+
readonly [K in keyof M]: FirebaseFunctionsConfigMapEntry<M[K]>;
|
|
28
28
|
};
|
|
29
29
|
export type FirebaseFunctionsConfigMapEntry<M extends FirebaseFunctionTypeMap> = [ClassLikeType, FirebaseFunctionMapFactory<M>];
|
|
30
30
|
/**
|
|
@@ -35,6 +35,6 @@ export type LazyFirebaseFunctionsFactory<M extends FirebaseFunctionsMap> = (func
|
|
|
35
35
|
* Map of FirebaseFunctionGetter values that are lazy-loaded via the getter.
|
|
36
36
|
*/
|
|
37
37
|
export type LazyFirebaseFunctions<M extends FirebaseFunctionsMap> = {
|
|
38
|
-
[K in keyof M]: FirebaseFunctionGetter<FirebaseFunctionMap<M[K]>>;
|
|
38
|
+
readonly [K in keyof M]: FirebaseFunctionGetter<FirebaseFunctionMap<M[K]>>;
|
|
39
39
|
};
|
|
40
40
|
export declare function lazyFirebaseFunctionsFactory<M extends FirebaseFunctionsMap, C extends FirebaseFunctionsConfigMap<M> = FirebaseFunctionsConfigMap<M>>(configMap: C): LazyFirebaseFunctionsFactory<M>;
|
|
@@ -13,7 +13,7 @@ export type ModelFirebaseCrudFunctionSpecifier = string;
|
|
|
13
13
|
* Provides a reference to a ModelFirebaseCrudFunctionSpecifier if available.
|
|
14
14
|
*/
|
|
15
15
|
export type ModelFirebaseCrudFunctionSpecifierRef = {
|
|
16
|
-
specifier?: ModelFirebaseCrudFunctionSpecifier;
|
|
16
|
+
readonly specifier?: ModelFirebaseCrudFunctionSpecifier;
|
|
17
17
|
};
|
|
18
18
|
export type ModelFirebaseCrudFunction<I, O = void> = FirebaseFunction<I, O>;
|
|
19
19
|
export type ModelFirebaseCreateFunction<I, O extends OnCallCreateModelResult = OnCallCreateModelResult> = ModelFirebaseCrudFunction<I, O>;
|
|
@@ -27,16 +27,16 @@ export type ModelFirebaseCrudFunctionTypeMapEntry = MaybeNot | Partial<ModelFire
|
|
|
27
27
|
export type ModelFirebaseCrudFunctionTypeMapEntryWithReturnType<I = unknown, O = unknown> = [I, O];
|
|
28
28
|
export type ModelFirebaseCrudFunctionTypeSpecifierConfig = Record<string | number, unknown | ModelFirebaseCrudFunctionTypeMapEntryWithReturnType>;
|
|
29
29
|
export type ModelFirebaseCrudFunctionCreateTypeConfig = {
|
|
30
|
-
create: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
30
|
+
readonly create: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
31
31
|
};
|
|
32
32
|
export type ModelFirebaseCrudFunctionReadTypeConfig = {
|
|
33
|
-
read: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
33
|
+
readonly read: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
34
34
|
};
|
|
35
35
|
export type ModelFirebaseCrudFunctionUpdateTypeConfig = {
|
|
36
|
-
update: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
36
|
+
readonly update: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
37
37
|
};
|
|
38
38
|
export type ModelFirebaseCrudFunctionDeleteTypeConfig = {
|
|
39
|
-
delete: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
39
|
+
readonly delete: unknown | ModelFirebaseCrudFunctionTypeSpecifierConfig;
|
|
40
40
|
};
|
|
41
41
|
export declare const MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT = "_";
|
|
42
42
|
export type ModelFirebaseCrudFunctionSpecifierDefault = typeof MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT;
|
|
@@ -20,16 +20,28 @@ export interface FirebaseAuthUserIdRef {
|
|
|
20
20
|
* Firebase Auth Token interface
|
|
21
21
|
*/
|
|
22
22
|
export interface FirebaseAuthToken {
|
|
23
|
-
email?: Maybe<string>;
|
|
24
|
-
emailVerified?: Maybe<boolean>;
|
|
25
|
-
phoneNumber?: Maybe<PhoneNumber>;
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
readonly email?: Maybe<string>;
|
|
24
|
+
readonly emailVerified?: Maybe<boolean>;
|
|
25
|
+
readonly phoneNumber?: Maybe<PhoneNumber>;
|
|
26
|
+
/**
|
|
27
|
+
* The date the user was created.
|
|
28
|
+
*/
|
|
29
|
+
readonly creationTime?: Maybe<ISO8601DateString>;
|
|
30
|
+
/**
|
|
31
|
+
* The last time the user signed in.
|
|
32
|
+
*
|
|
33
|
+
* This is not necessarily the last time they used the app, just the last time the auth system gave them a refresh token.
|
|
34
|
+
*/
|
|
35
|
+
readonly lastSignInTime?: Maybe<ISO8601DateString>;
|
|
36
|
+
/**
|
|
37
|
+
* The last time the user refreshed their token. The best indicator of recent activity.
|
|
38
|
+
*/
|
|
39
|
+
readonly lastRefreshTime?: Maybe<ISO8601DateString>;
|
|
28
40
|
}
|
|
29
|
-
export interface FirebaseAuthDetails extends FirebaseAuthToken, FirebaseAuthUserIdRef {
|
|
30
|
-
disabled?: Maybe<boolean>;
|
|
31
|
-
displayName?: Maybe<string>;
|
|
32
|
-
photoURL?: Maybe<WebsiteUrl>;
|
|
41
|
+
export interface FirebaseAuthDetails extends FirebaseAuthToken, Readonly<FirebaseAuthUserIdRef> {
|
|
42
|
+
readonly disabled?: Maybe<boolean>;
|
|
43
|
+
readonly displayName?: Maybe<string>;
|
|
44
|
+
readonly photoURL?: Maybe<WebsiteUrl>;
|
|
33
45
|
}
|
|
34
46
|
/**
|
|
35
47
|
* A string key used to test for ownership of a particular set of objects.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReadableError } from '@dereekb/util';
|
|
2
2
|
import { type FirebaseErrorCode } from '../error';
|
|
3
3
|
export interface FirebaseAuthError {
|
|
4
|
-
code: FirebaseErrorCode;
|
|
5
|
-
name: string;
|
|
6
|
-
customData: unknown;
|
|
4
|
+
readonly code: FirebaseErrorCode;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly customData: unknown;
|
|
7
7
|
}
|
|
8
8
|
export declare const FIREBASE_AUTH_USER_NOT_FOUND_ERROR = "auth/user-not-found";
|
|
9
9
|
export declare const FIREBASE_AUTH_WRONG_PASSWORD = "auth/wrong-password";
|
|
@@ -4,10 +4,10 @@ import { type Observable, type OperatorFunction } from 'rxjs';
|
|
|
4
4
|
import { type DocumentReferenceRef } from '../reference';
|
|
5
5
|
import { type PickProperties } from 'ts-essentials';
|
|
6
6
|
export interface FirestoreDocumentDeleteParams {
|
|
7
|
-
precondition?: Precondition;
|
|
7
|
+
readonly precondition?: Precondition;
|
|
8
8
|
}
|
|
9
9
|
export interface FirestoreDocumentUpdateParams {
|
|
10
|
-
precondition?: Precondition;
|
|
10
|
+
readonly precondition?: Precondition;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Used for performing increment updates.
|
|
@@ -8,7 +8,7 @@ export type FirestoreDataConverterFactory<T> = FactoryWithInput<FirestoreDataCon
|
|
|
8
8
|
* Ref to a FirestoreDataConverterFactory.
|
|
9
9
|
*/
|
|
10
10
|
export interface FirestoreDataConverterFactoryRef<T> {
|
|
11
|
-
converterFactory: FirestoreDataConverterFactory<T>;
|
|
11
|
+
readonly converterFactory: FirestoreDataConverterFactory<T>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Factory used to provide an optional custom FirestoreDataConverter based on the input reference.
|
|
@@ -2,7 +2,7 @@ import { type GrantedRole } from '@dereekb/model';
|
|
|
2
2
|
import { type FirebaseAuthUserId } from '../../auth';
|
|
3
3
|
import { type FirestoreModelId, type FirestoreModelKey } from './collection';
|
|
4
4
|
export type FirestoreModelKeyMap<T> = {
|
|
5
|
-
[key: FirestoreModelKey]: T;
|
|
5
|
+
readonly [key: FirestoreModelKey]: T;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Array of FirestoreModelKey values.
|
|
@@ -12,16 +12,16 @@ export type FirestoreModelKeyArray = FirestoreModelKey[];
|
|
|
12
12
|
* A map with a single GrantedRole provided for a given model.
|
|
13
13
|
*/
|
|
14
14
|
export type FirestoreModelKeyGrantedRoleMap<R extends GrantedRole> = {
|
|
15
|
-
[key: FirestoreModelKey]: R;
|
|
15
|
+
readonly [key: FirestoreModelKey]: R;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* A map with multiple GrantedRoles provided for a given model.
|
|
19
19
|
*/
|
|
20
20
|
export type FirestoreModelKeyGrantedRoleArrayMap<R extends GrantedRole> = {
|
|
21
|
-
[key: FirestoreModelKey]: R[];
|
|
21
|
+
readonly [key: FirestoreModelKey]: R[];
|
|
22
22
|
};
|
|
23
23
|
export type FirestoreModelIdMap<T> = {
|
|
24
|
-
[key: FirestoreModelId]: T;
|
|
24
|
+
readonly [key: FirestoreModelId]: T;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Array of FirestoreModelId values.
|
|
@@ -31,23 +31,23 @@ export type FirestoreModelIdArray = FirestoreModelId[];
|
|
|
31
31
|
* A map with a single GrantedRole provided for a given model.
|
|
32
32
|
*/
|
|
33
33
|
export type FirestoreModelIdGrantedRoleMap<R extends GrantedRole> = {
|
|
34
|
-
[key: FirestoreModelId]: R;
|
|
34
|
+
readonly [key: FirestoreModelId]: R;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* A map with multiple GrantedRoles provided for a given model.
|
|
38
38
|
*/
|
|
39
39
|
export type FirestoreModelIdGrantedRoleArrayMap<R extends GrantedRole> = {
|
|
40
|
-
[key: FirestoreModelId]: R[];
|
|
40
|
+
readonly [key: FirestoreModelId]: R[];
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* A map with a single GrantedRole provided for a given user.
|
|
44
44
|
*/
|
|
45
45
|
export type FirebaseAuthUserGrantedRoleMap<R extends GrantedRole> = {
|
|
46
|
-
[key: FirebaseAuthUserId]: R;
|
|
46
|
+
readonly [key: FirebaseAuthUserId]: R;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* A map with multiple GrantedRoles provided for a given user.
|
|
50
50
|
*/
|
|
51
51
|
export type FirebaseAuthUserRoleArrayMap<R extends GrantedRole> = {
|
|
52
|
-
[key: FirestoreModelKey]: R[];
|
|
52
|
+
readonly [key: FirestoreModelKey]: R[];
|
|
53
53
|
};
|
|
@@ -6,14 +6,14 @@ export type FirestoreQueryConstraintType = string;
|
|
|
6
6
|
* A constraint. Used by drivers to apply native firebase query constraints.
|
|
7
7
|
*/
|
|
8
8
|
export interface FirestoreQueryConstraint<T = unknown> {
|
|
9
|
-
type: FirestoreQueryConstraintType;
|
|
10
|
-
data: T;
|
|
9
|
+
readonly type: FirestoreQueryConstraintType;
|
|
10
|
+
readonly data: T;
|
|
11
11
|
}
|
|
12
12
|
export declare function firestoreQueryConstraint<T = unknown>(type: string, data: T): FirestoreQueryConstraint<T>;
|
|
13
13
|
export declare function firestoreQueryConstraintFactory(type: string): <T = unknown>(data: T) => FirestoreQueryConstraint<T>;
|
|
14
14
|
export declare const FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE = "limit";
|
|
15
15
|
export interface LimitQueryConstraintData {
|
|
16
|
-
limit: number;
|
|
16
|
+
readonly limit: number;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Limits the maximum number of documents to return.
|
|
@@ -24,7 +24,7 @@ export interface LimitQueryConstraintData {
|
|
|
24
24
|
export declare function limit(limit: number): FirestoreQueryConstraint<LimitQueryConstraintData>;
|
|
25
25
|
export declare const FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE = "limit_to_last";
|
|
26
26
|
export interface LimitToLastQueryConstraintData {
|
|
27
|
-
limit: number;
|
|
27
|
+
readonly limit: number;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Returns the last matching documents in the query, up to the limit.
|
|
@@ -55,9 +55,9 @@ export type WhereFilterOp = WhereFilterOpValue | WhereFilterOpArrayValue;
|
|
|
55
55
|
*/
|
|
56
56
|
export declare const FIRESTORE_MAX_WHERE_IN_FILTER_ARGS_COUNT = 10;
|
|
57
57
|
export interface WhereQueryConstraintData {
|
|
58
|
-
fieldPath: string | FieldPath;
|
|
59
|
-
opStr: WhereFilterOp;
|
|
60
|
-
value: unknown;
|
|
58
|
+
readonly fieldPath: string | FieldPath;
|
|
59
|
+
readonly opStr: WhereFilterOp;
|
|
60
|
+
readonly value: unknown;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Configures a Firebase where query.
|
|
@@ -76,8 +76,8 @@ export declare function whereDocumentId(opStr: WhereFilterOp, value: unknown): F
|
|
|
76
76
|
export declare const FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE = "order_by";
|
|
77
77
|
export type OrderByDirection = SortingOrder;
|
|
78
78
|
export interface OrderByQueryConstraintData {
|
|
79
|
-
fieldPath: FieldPathOrStringPath;
|
|
80
|
-
directionStr?: OrderByDirection;
|
|
79
|
+
readonly fieldPath: FieldPathOrStringPath;
|
|
80
|
+
readonly directionStr?: OrderByDirection;
|
|
81
81
|
}
|
|
82
82
|
export declare function orderBy<T>(fieldPath: StringKeyPropertyKeys<T>, directionStr?: OrderByDirection): FirestoreQueryConstraint<OrderByQueryConstraintData>;
|
|
83
83
|
export declare function orderBy(fieldPath: FieldPathOrStringPath, directionStr?: OrderByDirection): FirestoreQueryConstraint<OrderByQueryConstraintData>;
|
|
@@ -91,21 +91,21 @@ export interface StartAtQueryConstraintData<T = DocumentData> {
|
|
|
91
91
|
export declare function startAt<T = DocumentData>(snapshot: DocumentSnapshot<T>): FirestoreQueryConstraint<StartAtQueryConstraintData<T>>;
|
|
92
92
|
export declare const FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE = "start_at_path";
|
|
93
93
|
export interface StartAtValueQueryConstraintData {
|
|
94
|
-
fieldValues: unknown[];
|
|
94
|
+
readonly fieldValues: unknown[];
|
|
95
95
|
}
|
|
96
96
|
export declare function startAtValue(...fieldValues: unknown[]): FirestoreQueryConstraint<StartAtValueQueryConstraintData>;
|
|
97
97
|
export declare const FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE = "start_after";
|
|
98
98
|
export interface StartAfterQueryConstraintData<T = DocumentData> {
|
|
99
|
-
snapshot: DocumentSnapshot<T>;
|
|
99
|
+
readonly snapshot: DocumentSnapshot<T>;
|
|
100
100
|
}
|
|
101
101
|
export declare function startAfter<T = DocumentData>(snapshot: DocumentSnapshot<T>): FirestoreQueryConstraint<StartAfterQueryConstraintData<T>>;
|
|
102
102
|
export declare const FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE = "end_at";
|
|
103
103
|
export interface EndAtQueryConstraintData<T = DocumentData> {
|
|
104
|
-
snapshot: DocumentSnapshot<T>;
|
|
104
|
+
readonly snapshot: DocumentSnapshot<T>;
|
|
105
105
|
}
|
|
106
106
|
export declare const FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE = "end_at_path";
|
|
107
107
|
export interface EndAtValueQueryConstraintData {
|
|
108
|
-
fieldValues: unknown[];
|
|
108
|
+
readonly fieldValues: unknown[];
|
|
109
109
|
}
|
|
110
110
|
export declare function endAtValue(...fieldValues: unknown[]): FirestoreQueryConstraint<EndAtValueQueryConstraintData>;
|
|
111
111
|
/**
|
|
@@ -116,7 +116,7 @@ export declare function endAtValue(...fieldValues: unknown[]): FirestoreQueryCon
|
|
|
116
116
|
export declare function endAt<T = DocumentData>(snapshot: DocumentSnapshot<T>): FirestoreQueryConstraint<EndAtQueryConstraintData<T>>;
|
|
117
117
|
export declare const FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE = "end_before";
|
|
118
118
|
export interface EndBeforeQueryConstraintData<T = DocumentData> {
|
|
119
|
-
snapshot: DocumentSnapshot<T>;
|
|
119
|
+
readonly snapshot: DocumentSnapshot<T>;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
*
|
|
@@ -129,7 +129,7 @@ export declare function endBefore<T = DocumentData>(snapshot: DocumentSnapshot<T
|
|
|
129
129
|
*/
|
|
130
130
|
export type FirestoreQueryConstraintHandlerFunction<B, D = unknown> = (builder: B, data: D, constraint: FirestoreQueryConstraint<D>) => B;
|
|
131
131
|
export type FirestoreQueryConstraintHandlerMap<B> = {
|
|
132
|
-
[key: string]: Maybe<FirestoreQueryConstraintHandlerFunction<B, any>>;
|
|
132
|
+
readonly [key: string]: Maybe<FirestoreQueryConstraintHandlerFunction<B, any>>;
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
135
|
* The full list of known firestore query constraints, and the data associated with it.
|
|
@@ -9,11 +9,11 @@ export interface FirestoreItemPageIteratorFilter extends ItemPageLimit {
|
|
|
9
9
|
/**
|
|
10
10
|
* Overrides the default limit, if applicable.
|
|
11
11
|
*/
|
|
12
|
-
limit?: Maybe<number>;
|
|
12
|
+
readonly limit?: Maybe<number>;
|
|
13
13
|
/**
|
|
14
14
|
* Constraints to query on.
|
|
15
15
|
*/
|
|
16
|
-
constraints?: Maybe<ArrayOrValue<FirestoreQueryConstraint>>;
|
|
16
|
+
readonly constraints?: Maybe<ArrayOrValue<FirestoreQueryConstraint>>;
|
|
17
17
|
}
|
|
18
18
|
export interface FirestoreItemPageIterationBaseConfig<T> extends QueryLikeReferenceRef<T>, FirestoreQueryDriverRef, ItemPageLimit {
|
|
19
19
|
/**
|
|
@@ -21,7 +21,7 @@ export interface FirestoreItemPageIterationBaseConfig<T> extends QueryLikeRefere
|
|
|
21
21
|
*
|
|
22
22
|
* Defaults to 50
|
|
23
23
|
*/
|
|
24
|
-
itemsPerPage?: number;
|
|
24
|
+
readonly itemsPerPage?: number;
|
|
25
25
|
}
|
|
26
26
|
export interface FirestoreItemPageIterationConfig<T> extends FirestoreItemPageIterationBaseConfig<T>, ItemPageIterationConfig<FirestoreItemPageIteratorFilter> {
|
|
27
27
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type DocumentReference, type QuerySnapshot } from './../types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
export interface StreamDocsWithOnSnapshotFunctionParams<O> {
|
|
4
|
-
next: (value?: O | undefined) => void;
|
|
5
|
-
error: (err?: unknown) => void;
|
|
6
|
-
complete: () => void;
|
|
4
|
+
readonly next: (value?: O | undefined) => void;
|
|
5
|
+
readonly error: (err?: unknown) => void;
|
|
6
|
+
readonly complete: () => void;
|
|
7
7
|
}
|
|
8
8
|
export type StreamDocsUnsubscribeFunction = () => void;
|
|
9
9
|
/**
|
|
@@ -108,7 +108,7 @@ export type MapConfiguredFirestoreFieldConfig<V, D = unknown> = MapConfiguredFir
|
|
|
108
108
|
export type DefaultMapConfiguredFirestoreFieldConfig<V, D = unknown> = Omit<FirestoreFieldConfigWithDefault<V, D>, 'fromData' | 'toData' | 'default'> & Partial<Pick<FirestoreFieldConfigWithDefault<V, D>, 'default'>>;
|
|
109
109
|
export type OptionalMapConfiguredFirestoreFieldConfig<V, D = unknown> = Omit<BaseFirestoreFieldConfig<V, D>, 'fromData' | 'toData' | 'defaultBeforeSave'>;
|
|
110
110
|
export interface FirestoreStringConfig<S extends string = string> extends DefaultMapConfiguredFirestoreFieldConfig<S, S> {
|
|
111
|
-
transform?: TransformStringFunctionConfigInput<S>;
|
|
111
|
+
readonly transform?: TransformStringFunctionConfigInput<S>;
|
|
112
112
|
}
|
|
113
113
|
export declare const DEFAULT_FIRESTORE_STRING_FIELD_VALUE = "";
|
|
114
114
|
export declare function firestoreString<S extends string = string>(config?: FirestoreStringConfig<S>): FirestoreModelFieldMapFunctionsConfig<S, S>;
|
|
@@ -123,7 +123,7 @@ export declare function optionalFirestoreUID(): ModelFieldMapFunctionsConfig<May
|
|
|
123
123
|
export declare const firestoreModelKeyString: FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
124
124
|
export declare const firestoreModelIdString: FirestoreModelFieldMapFunctionsConfig<string, string>;
|
|
125
125
|
export type FirestoreDateFieldConfig = DefaultMapConfiguredFirestoreFieldConfig<Date, string> & {
|
|
126
|
-
saveDefaultAsNow?: boolean;
|
|
126
|
+
readonly saveDefaultAsNow?: boolean;
|
|
127
127
|
};
|
|
128
128
|
export declare function firestoreDate(config?: FirestoreDateFieldConfig): FirestoreModelFieldMapFunctionsConfig<Date, string>;
|
|
129
129
|
export type OptionalFirestoreDateFieldConfig = OptionalFirestoreFieldConfig<Date, ISO8601DateString>;
|
|
@@ -133,8 +133,8 @@ export declare function firestoreBoolean(config: FirestoreBooleanFieldConfig): F
|
|
|
133
133
|
export type OptionalFirestoreBooleanFieldConfig = OptionalOneTypeFirestoreFieldConfig<boolean>;
|
|
134
134
|
export declare function optionalFirestoreBoolean(config?: OptionalFirestoreBooleanFieldConfig): ModelFieldMapFunctionsConfig<Maybe<boolean>, Maybe<boolean>>;
|
|
135
135
|
export interface FirestoreNumberConfig<N extends number = number> extends MapConfiguredFirestoreFieldConfigWithDefault<N, N> {
|
|
136
|
-
saveDefault?: Maybe<boolean>;
|
|
137
|
-
transform?: TransformNumberFunctionConfigInput<N>;
|
|
136
|
+
readonly saveDefault?: Maybe<boolean>;
|
|
137
|
+
readonly transform?: TransformNumberFunctionConfigInput<N>;
|
|
138
138
|
}
|
|
139
139
|
export declare function firestoreNumber<N extends number = number>(config: FirestoreNumberConfig<N>): FirestoreModelFieldMapFunctionsConfig<N, N>;
|
|
140
140
|
export type OptionalFirestoreNumberFieldConfig<N extends number = number> = OptionalOneTypeFirestoreFieldConfig<N> & Pick<FirestoreNumberConfig<N>, 'transform'>;
|
|
@@ -353,11 +353,11 @@ export type FirestoreSubObjectFieldConfig<T extends object, O extends object = F
|
|
|
353
353
|
*
|
|
354
354
|
* Is false by default.
|
|
355
355
|
*/
|
|
356
|
-
saveDefaultObject?: boolean;
|
|
356
|
+
readonly saveDefaultObject?: boolean;
|
|
357
357
|
/**
|
|
358
358
|
* The fields to use for conversion.
|
|
359
359
|
*/
|
|
360
|
-
objectField: ToModelMapFunctionsInput<T, O>;
|
|
360
|
+
readonly objectField: ToModelMapFunctionsInput<T, O>;
|
|
361
361
|
};
|
|
362
362
|
export type FirestoreSubObjectFieldMapFunctionsConfig<T extends object, O extends object = FirestoreModelData<T>> = FirestoreModelFieldMapFunctionsConfig<T, O> & ModelMapFunctionsRef<T, O>;
|
|
363
363
|
/**
|
|
@@ -422,15 +422,15 @@ export declare const MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE: ZoomLevel;
|
|
|
422
422
|
*/
|
|
423
423
|
export declare const firestoreMapZoomLevel: FirestoreModelFieldMapFunctionsConfig<number, number>;
|
|
424
424
|
export interface FirestoreBitwiseSetConfig<D extends number = number> extends DefaultMapConfiguredFirestoreFieldConfig<Set<D>, BitwiseEncodedSet> {
|
|
425
|
-
maxIndex?: number;
|
|
425
|
+
readonly maxIndex?: number;
|
|
426
426
|
}
|
|
427
427
|
export declare function firestoreBitwiseSet<D extends number = number>(config: FirestoreBitwiseSetConfig<D>): FirestoreModelFieldMapFunctionsConfig<Set<D>, number>;
|
|
428
428
|
export interface FirestoreBitwiseSetMapConfig<D extends number = number, K extends string = string> extends Omit<FirestoreEncodedObjectMapFieldConfig<Set<D>, BitwiseEncodedSet, K>, 'encoder' | 'decoder'> {
|
|
429
|
-
maxIndex?: number;
|
|
429
|
+
readonly maxIndex?: number;
|
|
430
430
|
}
|
|
431
431
|
export declare function firestoreBitwiseSetMap<D extends number = number, K extends string = string>(config: FirestoreBitwiseSetMapConfig<D, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<Set<D>, K>, FirestoreMapFieldType<number, K>>;
|
|
432
432
|
export interface FirestoreBitwiseObjectMapConfig<T extends object, K extends string = string> extends Omit<FirestoreEncodedObjectMapFieldConfig<T, BitwiseEncodedSet, K>, 'encoder' | 'decoder'> {
|
|
433
|
-
dencoder: BitwiseObjectDencoder<T>;
|
|
433
|
+
readonly dencoder: BitwiseObjectDencoder<T>;
|
|
434
434
|
}
|
|
435
435
|
export declare function firestoreBitwiseObjectMap<T extends object, K extends string = string>(config: FirestoreBitwiseObjectMapConfig<T, K>): FirestoreModelFieldMapFunctionsConfig<FirestoreEncodedObjectMapFieldValueType<T, K>, FirestoreMapFieldType<number, K>>;
|
|
436
436
|
/**
|
|
@@ -4,7 +4,7 @@ import { type Getter } from '@dereekb/util';
|
|
|
4
4
|
export type FirebaseModelLoaderContext = FirebaseTransactionContext;
|
|
5
5
|
export type FirebaseModelGetFirestoreCollectionFunction<C extends FirebaseModelLoaderContext, T, D extends FirestoreDocument<T>> = (context: C) => FirestoreCollectionLike<T, D>;
|
|
6
6
|
export interface FirebaseModelCollectionLoader<C extends FirebaseModelLoaderContext, T, D extends FirestoreDocument<T>> {
|
|
7
|
-
getFirestoreCollection: FirebaseModelGetFirestoreCollectionFunction<C, T, D>;
|
|
7
|
+
readonly getFirestoreCollection: FirebaseModelGetFirestoreCollectionFunction<C, T, D>;
|
|
8
8
|
}
|
|
9
9
|
export interface FirebaseModelLoader<C extends FirebaseModelLoaderContext, T, D extends FirestoreDocument<T>> extends ModelLoader<C, D> {
|
|
10
10
|
/**
|
|
@@ -19,7 +19,7 @@ export interface FirebaseModelLoader<C extends FirebaseModelLoaderContext, T, D
|
|
|
19
19
|
}
|
|
20
20
|
export declare function firebaseModelLoader<C extends FirebaseModelLoaderContext, T, D extends FirestoreDocument<T>>(getFirestoreCollection: FirebaseModelGetFirestoreCollectionFunction<C, T, D>): FirebaseModelLoader<C, T, D>;
|
|
21
21
|
export interface InContextFirebaseModelCollectionLoader<T, D extends FirestoreDocument<T>> {
|
|
22
|
-
getFirestoreCollection: Getter<FirestoreCollectionLike<T, D>>;
|
|
22
|
+
readonly getFirestoreCollection: Getter<FirestoreCollectionLike<T, D>>;
|
|
23
23
|
}
|
|
24
24
|
export interface InContextFirebaseModelLoader<T, D extends FirestoreDocument<T>> extends InContextModelLoader<D> {
|
|
25
25
|
loadModelForKey(key: FirestoreModelKey): D;
|
|
@@ -11,7 +11,7 @@ export interface ModelStorageSlashPathFactoryConfig {
|
|
|
11
11
|
*
|
|
12
12
|
* This value is merged with the BASE_MODEL_STORAGE_FILE_PATH (/model/) base path configured for all ModelStorageSlashPathFactory values
|
|
13
13
|
*/
|
|
14
|
-
basePath?: string;
|
|
14
|
+
readonly basePath?: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Factory for SlashPath values using input ReadFirestoreModelKeyInput values.
|
|
@@ -20,11 +20,11 @@ export interface FirebaseStorageContextFactoryConfig {
|
|
|
20
20
|
/**
|
|
21
21
|
* The default bucket
|
|
22
22
|
*/
|
|
23
|
-
defaultBucketId?: StorageBucketId;
|
|
23
|
+
readonly defaultBucketId?: StorageBucketId;
|
|
24
24
|
/**
|
|
25
25
|
* Whether or not to force using the default bucket id.
|
|
26
26
|
*/
|
|
27
|
-
forceBucket?: boolean;
|
|
27
|
+
readonly forceBucket?: boolean;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Creates a new FirebaseStorageContextFactory given the input FirebaseStorageDrivers.
|
|
@@ -74,12 +74,12 @@ export interface StorageListFilesOptions {
|
|
|
74
74
|
* If set, limits the total number of `prefixes` and `items` to return.
|
|
75
75
|
* The default and maximum maxResults is 1000.
|
|
76
76
|
*/
|
|
77
|
-
maxResults?: number;
|
|
77
|
+
readonly maxResults?: number;
|
|
78
78
|
/**
|
|
79
79
|
* The `nextPageToken` from a previous call to `list()`. If provided,
|
|
80
80
|
* listing is resumed from the previous position.
|
|
81
81
|
*/
|
|
82
|
-
pageToken?: string;
|
|
82
|
+
readonly pageToken?: string;
|
|
83
83
|
}
|
|
84
84
|
export interface StorageListItemResult extends StoragePathRef {
|
|
85
85
|
/**
|
|
@@ -107,15 +107,15 @@ export interface StorageListFilesResult<R = unknown> {
|
|
|
107
107
|
/**
|
|
108
108
|
* The raw result.
|
|
109
109
|
*/
|
|
110
|
-
raw: R;
|
|
110
|
+
readonly raw: R;
|
|
111
111
|
/**
|
|
112
112
|
* Options used to retrieve the result.
|
|
113
113
|
*/
|
|
114
|
-
options: StorageListFilesOptions | undefined;
|
|
114
|
+
readonly options: StorageListFilesOptions | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* Whether or not there are more results available.
|
|
117
117
|
*/
|
|
118
|
-
hasNext: boolean;
|
|
118
|
+
readonly hasNext: boolean;
|
|
119
119
|
/**
|
|
120
120
|
* Returns true if any files or folders exist in the results.
|
|
121
121
|
*/
|
|
@@ -5,6 +5,6 @@ export type FirebaseStorageDriverType = 'production' | 'testing';
|
|
|
5
5
|
* Implements all FirebaseStorage related driver reference interfaces.
|
|
6
6
|
*/
|
|
7
7
|
export interface FirebaseStorageDrivers extends FirebaseStorageAccessorDriverRef {
|
|
8
|
-
storageDriverIdentifier?: FirebaseStorageDriverIdentifier;
|
|
9
|
-
storageDriverType: FirebaseStorageDriverType;
|
|
8
|
+
readonly storageDriverIdentifier?: FirebaseStorageDriverIdentifier;
|
|
9
|
+
readonly storageDriverType: FirebaseStorageDriverType;
|
|
10
10
|
}
|
|
@@ -9,7 +9,7 @@ export type StorageBucketId = string;
|
|
|
9
9
|
* A reference to a StorageBucketId
|
|
10
10
|
*/
|
|
11
11
|
export interface StorageBucketIdRef {
|
|
12
|
-
bucketId: StorageBucketId;
|
|
12
|
+
readonly bucketId: StorageBucketId;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* A filepath to a file or folder.
|
|
@@ -24,7 +24,7 @@ export interface StorageSlashPathRef {
|
|
|
24
24
|
*
|
|
25
25
|
* For example, if a file is at the path '<bucket>/full/path/image.png', the pathString is 'full/path/image.png'.
|
|
26
26
|
*/
|
|
27
|
-
pathString: StorageSlashPath;
|
|
27
|
+
readonly pathString: StorageSlashPath;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* A bucket and path pair.
|
|
@@ -47,7 +47,7 @@ export interface StoragePathFactoryConfig extends StorageBucketIdRef {
|
|
|
47
47
|
*
|
|
48
48
|
* False by default.
|
|
49
49
|
*/
|
|
50
|
-
replaceBucket?: boolean;
|
|
50
|
+
readonly replaceBucket?: boolean;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Creates a StoragePathFactory.
|
|
@@ -60,7 +60,7 @@ export declare function storagePathFactory(config: StoragePathFactoryConfig): St
|
|
|
60
60
|
* A reference to a StoragePath
|
|
61
61
|
*/
|
|
62
62
|
export interface StoragePathRef {
|
|
63
|
-
storagePath: StoragePath;
|
|
63
|
+
readonly storagePath: StoragePath;
|
|
64
64
|
}
|
|
65
65
|
export type GoogleCloudStorageBucketPrefix<S extends StorageBucketId = StorageBucketId> = `gs://${S}`;
|
|
66
66
|
export type GoogleCloudStorageDefaultBucketFilePath<P extends StorageSlashPath = StorageSlashPath> = P;
|
|
@@ -4,16 +4,16 @@ export type FirebaseStorageLikeStorage = {
|
|
|
4
4
|
/**
|
|
5
5
|
* The maximum time to retry uploads in milliseconds.
|
|
6
6
|
*/
|
|
7
|
-
maxUploadRetryTime: number;
|
|
7
|
+
readonly maxUploadRetryTime: number;
|
|
8
8
|
/**
|
|
9
9
|
* The maximum time to retry operations other than uploads or downloads in
|
|
10
10
|
* milliseconds.
|
|
11
11
|
*/
|
|
12
|
-
maxOperationRetryTime: number;
|
|
12
|
+
readonly maxOperationRetryTime: number;
|
|
13
13
|
};
|
|
14
14
|
export type GoogleCloudLikeStorage = {
|
|
15
|
-
baseUrl: string;
|
|
16
|
-
projectId: string;
|
|
15
|
+
readonly baseUrl: string;
|
|
16
|
+
readonly projectId: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Cast to the local type's Storage if direct access is needed. In most cases, direct access to this type is unncessary.
|
|
@@ -114,19 +114,19 @@ export type StorageUploadTask = {
|
|
|
114
114
|
export type StorageClientUploadResult = unknown;
|
|
115
115
|
export type StorageUploadResult = StorageClientUploadResult | unknown;
|
|
116
116
|
export interface StorageUploadOptions {
|
|
117
|
-
resumable?: boolean;
|
|
117
|
+
readonly resumable?: boolean;
|
|
118
118
|
/**
|
|
119
119
|
* String format to handle the upload as. Required if the input is a string.
|
|
120
120
|
*/
|
|
121
|
-
stringFormat?: StorageDataStringType;
|
|
121
|
+
readonly stringFormat?: StorageDataStringType;
|
|
122
122
|
/**
|
|
123
123
|
* ContentType for the upload.
|
|
124
124
|
*/
|
|
125
|
-
contentType?: string;
|
|
125
|
+
readonly contentType?: string;
|
|
126
126
|
/**
|
|
127
127
|
* other metadata to attach to the file.
|
|
128
128
|
*/
|
|
129
|
-
metadata?: StorageMetadata;
|
|
129
|
+
readonly metadata?: StorageMetadata;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* Storage metadata for a Storage object.
|
|
@@ -137,78 +137,78 @@ export interface StorageMetadata {
|
|
|
137
137
|
/**
|
|
138
138
|
* The bucket this object is contained in.
|
|
139
139
|
*/
|
|
140
|
-
bucket: string;
|
|
140
|
+
readonly bucket: string;
|
|
141
141
|
/**
|
|
142
142
|
* The full path of this object.
|
|
143
143
|
*
|
|
144
144
|
* For example, if a file is at the path '<bucket>/full/path/image.png', the pathString is 'full/path/image.png'.
|
|
145
145
|
*/
|
|
146
|
-
fullPath: string;
|
|
146
|
+
readonly fullPath: string;
|
|
147
147
|
/**
|
|
148
148
|
* The object's generation.
|
|
149
149
|
* {@link https://cloud.google.com/storage/docs/metadata#generation-number}
|
|
150
150
|
*/
|
|
151
|
-
generation: string;
|
|
151
|
+
readonly generation: string;
|
|
152
152
|
/**
|
|
153
153
|
* The object's metageneration.
|
|
154
154
|
* {@link https://cloud.google.com/storage/docs/metadata#generation-number}
|
|
155
155
|
*/
|
|
156
|
-
metageneration: string;
|
|
156
|
+
readonly metageneration: string;
|
|
157
157
|
/**
|
|
158
158
|
* The short name of this object, which is the last component of the full path.
|
|
159
159
|
* For example, if fullPath is 'full/path/image.png', name is 'image.png'.
|
|
160
160
|
*/
|
|
161
|
-
name: string;
|
|
161
|
+
readonly name: string;
|
|
162
162
|
/**
|
|
163
163
|
* The size of this object, in bytes.
|
|
164
164
|
*/
|
|
165
|
-
size: number;
|
|
165
|
+
readonly size: number;
|
|
166
166
|
/**
|
|
167
167
|
* A date string representing when this object was created.
|
|
168
168
|
*/
|
|
169
|
-
timeCreated: ISO8601DateString;
|
|
169
|
+
readonly timeCreated: ISO8601DateString;
|
|
170
170
|
/**
|
|
171
171
|
* A date string representing when this object was last updated.
|
|
172
172
|
*/
|
|
173
|
-
updated: ISO8601DateString;
|
|
173
|
+
readonly updated: ISO8601DateString;
|
|
174
174
|
/**
|
|
175
175
|
* A Base64-encoded MD5 hash of the object being uploaded.
|
|
176
176
|
*/
|
|
177
|
-
md5Hash?: string | undefined;
|
|
177
|
+
readonly md5Hash?: string | undefined;
|
|
178
178
|
/**
|
|
179
179
|
* Served as the 'Cache-Control' header on object download.
|
|
180
180
|
*/
|
|
181
|
-
cacheControl?: string | undefined;
|
|
181
|
+
readonly cacheControl?: string | undefined;
|
|
182
182
|
/**
|
|
183
183
|
* Served as the 'Content-Disposition' header on object download.
|
|
184
184
|
*/
|
|
185
|
-
contentDisposition?: string | undefined;
|
|
185
|
+
readonly contentDisposition?: string | undefined;
|
|
186
186
|
/**
|
|
187
187
|
* Served as the 'Content-Encoding' header on object download.
|
|
188
188
|
*/
|
|
189
|
-
contentEncoding?: string | undefined;
|
|
189
|
+
readonly contentEncoding?: string | undefined;
|
|
190
190
|
/**
|
|
191
191
|
* Served as the 'Content-Language' header on object download.
|
|
192
192
|
*/
|
|
193
|
-
contentLanguage?: string | undefined;
|
|
193
|
+
readonly contentLanguage?: string | undefined;
|
|
194
194
|
/**
|
|
195
195
|
* Served as the 'Content-Type' header on object download.
|
|
196
196
|
*/
|
|
197
|
-
contentType?: string | undefined;
|
|
197
|
+
readonly contentType?: string | undefined;
|
|
198
198
|
/**
|
|
199
199
|
* Any user-specified custom metdata.
|
|
200
200
|
*/
|
|
201
|
-
customMetadata?: StorageCustomMetadata | undefined;
|
|
201
|
+
readonly customMetadata?: StorageCustomMetadata | undefined;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* Additional user-defined custom metadata.
|
|
205
205
|
*/
|
|
206
206
|
export type StorageCustomMetadata = {
|
|
207
|
-
[key: string]: string;
|
|
207
|
+
readonly [key: string]: string;
|
|
208
208
|
};
|
|
209
209
|
export interface StorageDeleteFileOptions {
|
|
210
210
|
/**
|
|
211
211
|
* Ignores errors related to the file not existing.
|
|
212
212
|
*/
|
|
213
|
-
ignoreNotFound?: boolean;
|
|
213
|
+
readonly ignoreNotFound?: boolean;
|
|
214
214
|
}
|
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [10.0.20](https://github.com/dereekb/dbx-components/compare/v10.0.19-dev...v10.0.20) (2024-02-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
## [10.0.19](https://github.com/dereekb/dbx-components/compare/v10.0.18-dev...v10.0.19) (2024-02-13)
|
|
6
10
|
|
|
7
11
|
|