@dereekb/firebase-server 9.25.16 → 10.0.1
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/CHANGELOG.md +12 -0
- package/mailgun/package.json +2 -49
- package/package.json +22 -46
- package/src/lib/auth/auth.service.d.ts +1 -2
- package/src/lib/env/env.service.d.ts +0 -4
- package/src/lib/env/env.service.js.map +1 -1
- package/src/lib/firestore/driver.d.ts +1 -1
- package/src/lib/firestore/driver.query.d.ts +1 -1
- package/src/lib/function/assert.d.ts +9 -1
- package/src/lib/function/assert.js +16 -1
- package/src/lib/function/assert.js.map +1 -1
- package/src/lib/function/context.d.ts +1 -1
- package/src/lib/function/error.d.ts +1 -1
- package/src/lib/function/type.d.ts +2 -2
- package/src/lib/nest/app.d.ts +2 -2
- package/src/lib/nest/app.js +1 -1
- package/src/lib/nest/app.js.map +1 -1
- package/src/lib/nest/auth/auth.module.d.ts +2 -2
- package/src/lib/nest/auth/auth.module.js +2 -3
- package/src/lib/nest/auth/auth.module.js.map +1 -1
- package/src/lib/nest/development/development.assert.function.d.ts +1 -1
- package/src/lib/nest/development/development.function.d.ts +2 -2
- package/src/lib/nest/env/env.service.d.ts +0 -4
- package/src/lib/nest/env/env.service.js +2 -9
- package/src/lib/nest/env/env.service.js.map +1 -1
- package/src/lib/nest/env/index.d.ts +0 -2
- package/src/lib/nest/env/index.js +0 -2
- package/src/lib/nest/env/index.js.map +1 -1
- package/src/lib/nest/firestore/firestore.module.d.ts +1 -1
- package/src/lib/nest/firestore/firestore.module.js +4 -6
- package/src/lib/nest/firestore/firestore.module.js.map +1 -1
- package/src/lib/nest/function/call.d.ts +5 -5
- package/src/lib/nest/function/context.d.ts +3 -3
- package/src/lib/nest/function/nest.d.ts +5 -5
- package/src/lib/nest/function/schedule.d.ts +7 -7
- package/src/lib/nest/function/v1/call.d.ts +4 -4
- package/src/lib/nest/function/v1/event.d.ts +12 -12
- package/src/lib/nest/function/v1/schedule.d.ts +3 -3
- package/src/lib/nest/function/v2/blocking.d.ts +6 -6
- package/src/lib/nest/function/v2/call.d.ts +3 -3
- package/src/lib/nest/function/v2/event.d.ts +7 -7
- package/src/lib/nest/function/v2/schedule.d.ts +4 -4
- package/src/lib/nest/function/v2/taskqueue.d.ts +6 -6
- package/src/lib/nest/middleware/appcheck.middleware.js +2 -3
- package/src/lib/nest/middleware/appcheck.middleware.js.map +1 -1
- package/src/lib/nest/middleware/appcheck.module.js +2 -3
- package/src/lib/nest/middleware/appcheck.module.js.map +1 -1
- package/src/lib/nest/middleware/rawbody.middleware.js +2 -3
- package/src/lib/nest/middleware/rawbody.middleware.js.map +1 -1
- package/src/lib/nest/middleware/webhook.js +2 -3
- package/src/lib/nest/middleware/webhook.js.map +1 -1
- package/src/lib/nest/model/create.model.function.d.ts +2 -2
- package/src/lib/nest/model/crud.assert.function.d.ts +1 -1
- package/src/lib/nest/model/delete.model.function.d.ts +2 -2
- package/src/lib/nest/model/read.model.function.d.ts +2 -2
- package/src/lib/nest/model/specifier.function.d.ts +3 -3
- package/src/lib/nest/model/update.model.function.d.ts +2 -2
- package/src/lib/nest/nest.provider.d.ts +5 -5
- package/src/lib/nest/storage/storage.module.d.ts +2 -2
- package/src/lib/nest/storage/storage.module.js +4 -6
- package/src/lib/nest/storage/storage.module.js.map +1 -1
- package/src/lib/storage/driver.accessor.d.ts +2 -2
- package/src/lib/storage/driver.d.ts +1 -1
- package/test/package.json +2 -48
- package/test/src/lib/firebase/firebase.admin.auth.d.ts +6 -6
- package/test/src/lib/firebase/firebase.admin.auth.js +1 -1
- package/test/src/lib/firebase/firebase.admin.auth.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.collection.d.ts +1 -1
- package/test/src/lib/firebase/firebase.admin.collection.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.d.ts +1 -1
- package/test/src/lib/firebase/firebase.admin.function.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.nest.d.ts +2 -2
- package/test/src/lib/firebase/firebase.admin.nest.function.context.d.ts +4 -4
- package/test/src/lib/firebase/firebase.admin.nest.function.context.js.map +1 -1
- package/test/src/lib/firebase/firebase.admin.nest.function.d.ts +3 -3
- package/test/src/lib/firebase/firebase.d.ts +1 -1
- package/test/src/lib/firebase/firebase.function.d.ts +9 -9
- package/test/src/lib/firestore/firestore.admin.d.ts +1 -1
- package/test/src/lib/firestore/firestore.d.ts +1 -1
- package/test/src/lib/storage/storage.admin.d.ts +1 -1
- package/test/src/lib/storage/storage.d.ts +1 -1
- package/src/lib/nest/env/env.config.d.ts +0 -5
- package/src/lib/nest/env/env.config.js +0 -3
- package/src/lib/nest/env/env.config.js.map +0 -1
- package/src/lib/nest/env/env.nest.d.ts +0 -10
- package/src/lib/nest/env/env.nest.js +0 -14
- package/src/lib/nest/env/env.nest.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [10.0.1](https://github.com/dereekb/dbx-components/compare/v10.0.0-dev...v10.0.1) (2024-01-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [10.0.0](https://github.com/dereekb/dbx-components/compare/v9.25.17...v10.0.0) (2024-01-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [9.25.17](https://github.com/dereekb/dbx-components/compare/v10.0.0-pre...v9.25.17) (2024-01-10)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## [9.25.16](https://github.com/dereekb/dbx-components/compare/v9.25.15-dev...v9.25.16) (2023-12-01)
|
|
6
18
|
|
|
7
19
|
|
package/mailgun/package.json
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/mailgun",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"main": "./src/index.js"
|
|
6
|
-
"types": "./src/index.d.ts",
|
|
7
|
-
"dependencies": {},
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
"@dereekb/nestjs/mailgun": "9.25.16",
|
|
10
|
-
"@nestjs/common": "^9.0.0",
|
|
11
|
-
"mailgun.js": "^8.0.0",
|
|
12
|
-
"form-data": "4.0.0",
|
|
13
|
-
"@dereekb/util": "9.25.16",
|
|
14
|
-
"lodash.isequal": "^4.5.0",
|
|
15
|
-
"make-error": "^1.3.0",
|
|
16
|
-
"class-validator": "^0.13.2",
|
|
17
|
-
"ts-essentials": "^9.1.2",
|
|
18
|
-
"extra-set": "^2.2.11",
|
|
19
|
-
"date-fns": "^2.29.0",
|
|
20
|
-
"@dereekb/nestjs": "9.25.16",
|
|
21
|
-
"@nestjs/config": "^2.0.1",
|
|
22
|
-
"@dereekb/firebase-server": "9.25.16",
|
|
23
|
-
"jsonwebtoken": "^9.0.0",
|
|
24
|
-
"@dereekb/firebase": "9.25.16",
|
|
25
|
-
"rxjs": "^7.5.0",
|
|
26
|
-
"firebase": "^9.9.2",
|
|
27
|
-
"class-transformer": "^0.5.1",
|
|
28
|
-
"@dereekb/rxjs": "9.25.16",
|
|
29
|
-
"ms": "^3.0.0-canary.1",
|
|
30
|
-
"@dereekb/model": "9.25.16",
|
|
31
|
-
"@dereekb/date": "9.25.16",
|
|
32
|
-
"date-fns-tz": "^1.3.0",
|
|
33
|
-
"rrule": "git+https://git@github.com/dereekb/rrule#2b13b1ea881059ba2ecfec380e12ef244ef54570",
|
|
34
|
-
"@vvo/tzdb": "^6.0.0",
|
|
35
|
-
"firebase-functions": "^4.0.0",
|
|
36
|
-
"firebase-admin": "^11.4.1",
|
|
37
|
-
"@dereekb/dbx-core": "9.25.16",
|
|
38
|
-
"tslib": "^2.0.0",
|
|
39
|
-
"@angular/common": "^14.2.0",
|
|
40
|
-
"@angular/core": "^14.2.0",
|
|
41
|
-
"@ngrx/component-store": "^14.0.0",
|
|
42
|
-
"@ngrx/data": "^14.0.0",
|
|
43
|
-
"@ngrx/effects": "^14.0.0",
|
|
44
|
-
"@ngrx/entity": "^14.0.0",
|
|
45
|
-
"@ngrx/store": "^14.0.0",
|
|
46
|
-
"@angular/platform-browser": "^14.2.0",
|
|
47
|
-
"@uirouter/core": "^6.0.8",
|
|
48
|
-
"@angular/router": "^14.2.0",
|
|
49
|
-
"@google-cloud/firestore": "^6.3.0",
|
|
50
|
-
"@nestjs/core": "^9.0.0",
|
|
51
|
-
"@nestjs/platform-express": "^9.0.0"
|
|
52
|
-
}
|
|
5
|
+
"main": "./src/index.js"
|
|
53
6
|
}
|
package/package.json
CHANGED
|
@@ -1,50 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server",
|
|
3
|
-
"version": "
|
|
4
|
-
"devDependencies": {
|
|
5
|
-
"firebase-functions-test": "2.0.2"
|
|
6
|
-
},
|
|
7
|
-
"peerDependencies": {
|
|
8
|
-
"jsonwebtoken": "^8.0.0",
|
|
9
|
-
"@dereekb/firebase": "9.25.16",
|
|
10
|
-
"rxjs": "^7.5.0",
|
|
11
|
-
"firebase": "^9.9.2",
|
|
12
|
-
"@dereekb/util": "9.25.16",
|
|
13
|
-
"lodash.isequal": "^4.5.0",
|
|
14
|
-
"make-error": "^1.3.0",
|
|
15
|
-
"class-validator": "^0.13.2",
|
|
16
|
-
"ts-essentials": "^9.1.2",
|
|
17
|
-
"extra-set": "^2.2.11",
|
|
18
|
-
"date-fns": "^2.29.0",
|
|
19
|
-
"class-transformer": "^0.5.1",
|
|
20
|
-
"@dereekb/rxjs": "9.25.16",
|
|
21
|
-
"ms": "^3.0.0-canary.1",
|
|
22
|
-
"@dereekb/model": "9.25.16",
|
|
23
|
-
"@dereekb/date": "9.25.16",
|
|
24
|
-
"date-fns-tz": "^1.3.0",
|
|
25
|
-
"rrule": "git+https://git@github.com/dereekb/rrule#2b13b1ea881059ba2ecfec380e12ef244ef54570",
|
|
26
|
-
"@vvo/tzdb": "^6.0.0",
|
|
27
|
-
"firebase-functions": "^4.0.0",
|
|
28
|
-
"firebase-admin": "^11.4.1",
|
|
29
|
-
"@dereekb/dbx-core": "9.25.16",
|
|
30
|
-
"tslib": "^2.0.0",
|
|
31
|
-
"@angular/common": "^14.2.0",
|
|
32
|
-
"@angular/core": "^14.2.0",
|
|
33
|
-
"@ngrx/component-store": "^14.0.0",
|
|
34
|
-
"@ngrx/data": "^14.0.0",
|
|
35
|
-
"@ngrx/effects": "^14.0.0",
|
|
36
|
-
"@ngrx/entity": "^14.0.0",
|
|
37
|
-
"@ngrx/store": "^14.0.0",
|
|
38
|
-
"@angular/platform-browser": "^14.2.0",
|
|
39
|
-
"@uirouter/core": "^6.0.8",
|
|
40
|
-
"@angular/router": "^14.2.0",
|
|
41
|
-
"@google-cloud/firestore": "^6.3.0",
|
|
42
|
-
"@nestjs/common": "^9.0.0",
|
|
43
|
-
"@nestjs/core": "^9.0.0",
|
|
44
|
-
"@nestjs/platform-express": "^9.0.0",
|
|
45
|
-
"@dereekb/nestjs": "9.25.16",
|
|
46
|
-
"@nestjs/config": "^2.0.1"
|
|
47
|
-
},
|
|
3
|
+
"version": "10.0.1",
|
|
48
4
|
"exports": {
|
|
49
5
|
".": {
|
|
50
6
|
"types": "./src/index.d.ts",
|
|
@@ -67,5 +23,25 @@
|
|
|
67
23
|
},
|
|
68
24
|
"main": "./src/index.js",
|
|
69
25
|
"types": "./src/index.d.ts",
|
|
70
|
-
"
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@dereekb/firebase": "*",
|
|
28
|
+
"@dereekb/util": "*",
|
|
29
|
+
"@dereekb/date": "*",
|
|
30
|
+
"@dereekb/dbx-core": "*",
|
|
31
|
+
"express": "4.18.2",
|
|
32
|
+
"@dereekb/nestjs": "*",
|
|
33
|
+
"@dereekb/model": "*",
|
|
34
|
+
"@google-cloud/storage": "6.12.0",
|
|
35
|
+
"firebase-functions": "^4.0.0",
|
|
36
|
+
"firebase-admin": "^11.4.1",
|
|
37
|
+
"@google-cloud/firestore": "^6.3.0",
|
|
38
|
+
"rxjs": "^7.5.0",
|
|
39
|
+
"@nestjs/common": "^10.0.0",
|
|
40
|
+
"@nestjs/core": "^10.0.0",
|
|
41
|
+
"@nestjs/platform-express": "10.0.0",
|
|
42
|
+
"class-validator": "^0.14.0",
|
|
43
|
+
"ts-essentials": "^9.1.2"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {},
|
|
46
|
+
"type": "commonjs"
|
|
71
47
|
}
|
|
@@ -271,7 +271,7 @@ export interface FirebaseServerNewUserService<D = unknown, U extends FirebaseSer
|
|
|
271
271
|
* 1 hour
|
|
272
272
|
*/
|
|
273
273
|
export declare const DEFAULT_SETUP_COM_THROTTLE_TIME: number;
|
|
274
|
-
export
|
|
274
|
+
export type UserContextOrUid<U extends FirebaseServerAuthUserContext = FirebaseServerAuthUserContext> = U | FirebaseAuthUserId;
|
|
275
275
|
export declare function userContextFromUid<U extends FirebaseServerAuthUserContext = FirebaseServerAuthUserContext>(authService: FirebaseServerAuthService<U>, userContextOrUid: UserContextOrUid<U>): U;
|
|
276
276
|
export declare abstract class AbstractFirebaseServerNewUserService<U extends FirebaseServerAuthUserContext = FirebaseServerAuthUserContext, C extends FirebaseServerAuthContext = FirebaseServerAuthContext, D = unknown> implements FirebaseServerNewUserService<D, U> {
|
|
277
277
|
readonly authService: FirebaseServerAuthService<U, C>;
|
|
@@ -399,4 +399,3 @@ export declare abstract class AbstractFirebaseServerAuthService<U extends Fireba
|
|
|
399
399
|
authContextInfo(context: AuthDataRef): Maybe<FirebaseAuthContextInfo>;
|
|
400
400
|
authDetailsForRecord(record: admin.auth.UserRecord): FirebaseAuthDetails;
|
|
401
401
|
}
|
|
402
|
-
export { FirebaseAuthNewUserClaimsData as FirebaseServerAuthNewUserClaimsData, FirebaseAuthSetupPassword as FirebaseServerAuthSetupPassword };
|
|
@@ -9,8 +9,4 @@ export declare abstract class FirebaseServerEnvService {
|
|
|
9
9
|
abstract readonly isProduction: boolean;
|
|
10
10
|
abstract readonly developerToolsEnabled: boolean;
|
|
11
11
|
abstract readonly developmentSchedulerEnabled: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated use developerToolsEnabled instead.
|
|
14
|
-
*/
|
|
15
|
-
abstract readonly isDevelopmentToolsEnabled: boolean;
|
|
16
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/env/env.service.ts"],"names":[],"mappings":";;;AAOA,MAAsB,wBAAwB;
|
|
1
|
+
{"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/env/env.service.ts"],"names":[],"mappings":";;;AAOA,MAAsB,wBAAwB;CAK7C;AALD,4DAKC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Query as GoogleCloudQuery } from '@google-cloud/firestore';
|
|
2
2
|
import { FullFirestoreQueryConstraintHandlersMapping, FirestoreQueryConstraintFunctionsDriver, FirestoreQueryDriver } from '@dereekb/firebase';
|
|
3
|
-
export
|
|
3
|
+
export type FirestoreServerQueryBuilder<T = any> = GoogleCloudQuery<T>;
|
|
4
4
|
export declare const FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING: FullFirestoreQueryConstraintHandlersMapping<FirestoreServerQueryBuilder>;
|
|
5
5
|
export declare function firestoreClientQueryConstraintFunctionsDriver(): FirestoreQueryConstraintFunctionsDriver;
|
|
6
6
|
export declare function googleCloudFirestoreQueryDriver(): FirestoreQueryDriver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FirestoreDocument, FirestoreDocumentData } from '@dereekb/firebase';
|
|
1
|
+
import { DocumentDataWithIdAndKey, FirestoreDocument, FirestoreDocumentData } from '@dereekb/firebase';
|
|
2
2
|
import * as functions from 'firebase-functions';
|
|
3
3
|
export declare function assertContextHasAuth(context: functions.https.CallableContext): void;
|
|
4
4
|
/**
|
|
@@ -9,6 +9,14 @@ export declare function assertContextHasAuth(context: functions.https.CallableCo
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export declare function assertSnapshotData<D extends FirestoreDocument<any>>(document: D, message?: string): Promise<FirestoreDocumentData<D>>;
|
|
12
|
+
/**
|
|
13
|
+
* Convenience function for assertSnapshotData that also attaches the id and key of the document to the data.
|
|
14
|
+
*
|
|
15
|
+
* @param document
|
|
16
|
+
* @param message
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export declare function assertSnapshotDataWithKey<D extends FirestoreDocument<any>>(document: D, message?: string): Promise<DocumentDataWithIdAndKey<FirestoreDocumentData<D>>>;
|
|
12
20
|
/**
|
|
13
21
|
* Asserts that the document exists. A modelNotAvailableError is thrown if the document does not exist.
|
|
14
22
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertDocumentExists = exports.assertSnapshotData = exports.assertContextHasAuth = void 0;
|
|
3
|
+
exports.assertDocumentExists = exports.assertSnapshotDataWithKey = exports.assertSnapshotData = exports.assertContextHasAuth = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const firebase_1 = require("@dereekb/firebase");
|
|
5
6
|
const context_1 = require("./context");
|
|
6
7
|
const error_1 = require("./error");
|
|
7
8
|
function assertContextHasAuth(context) {
|
|
@@ -29,6 +30,20 @@ function assertSnapshotData(document, message) {
|
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
exports.assertSnapshotData = assertSnapshotData;
|
|
33
|
+
/**
|
|
34
|
+
* Convenience function for assertSnapshotData that also attaches the id and key of the document to the data.
|
|
35
|
+
*
|
|
36
|
+
* @param document
|
|
37
|
+
* @param message
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
function assertSnapshotDataWithKey(document, message) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const data = yield assertSnapshotData(document, message);
|
|
43
|
+
return (0, firebase_1.setIdAndKeyFromKeyIdRefOnDocumentData)(data, document);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
exports.assertSnapshotDataWithKey = assertSnapshotDataWithKey;
|
|
32
47
|
/**
|
|
33
48
|
* Asserts that the document exists. A modelNotAvailableError is thrown if the document does not exist.
|
|
34
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/function/assert.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/function/assert.ts"],"names":[],"mappings":";;;;AAAA,gDAA8I;AAE9I,uCAAkD;AAClD,mCAAsF;AAEtF,SAAgB,oBAAoB,CAAC,OAAwC;IAC3E,IAAI,CAAC,IAAA,+BAAqB,EAAC,OAAO,CAAC,EAAE;QACnC,MAAM,IAAA,2CAAmC,GAAE,CAAC;KAC7C;AACH,CAAC;AAJD,oDAIC;AAED;;;;;;GAMG;AACH,SAAsB,kBAAkB,CAAmC,QAAW,EAAE,OAAgB;;QACtG,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;QAE3C,IAAI,IAAI,IAAI,IAAI,EAAE;YAChB,MAAM,IAAA,8BAAsB,EAAC;gBAC3B,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,OAAO,QAAQ,CAAC,SAAS,mBAAmB;aACjE,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CAAA;AAVD,gDAUC;AAED;;;;;;GAMG;AACH,SAAsB,yBAAyB,CAAmC,QAAW,EAAE,OAAgB;;QAC7G,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO,IAAA,gDAAqC,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC;CAAA;AAHD,8DAGC;AAED;;;;;;GAMG;AACH,SAAsB,oBAAoB,CAAmC,QAAW,EAAE,OAAgB;;QACxG,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;QAEvC,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAA,8BAAsB,EAAC;gBAC3B,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,OAAO,QAAQ,CAAC,SAAS,mBAAmB;aACjE,CAAC,CAAC;SACJ;IACH,CAAC;CAAA;AARD,oDAQC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as functions from 'firebase-functions';
|
|
2
|
-
export
|
|
2
|
+
export type CallableContextWithAuthData<R extends functions.https.CallableContext = functions.https.CallableContext> = Omit<R, 'auth'> & Required<Pick<R, 'auth'>>;
|
|
3
3
|
export declare function isContextWithAuthData<R extends functions.https.CallableContext>(context: functions.https.CallableContext): context is CallableContextWithAuthData<R>;
|
|
4
4
|
export declare function assertIsContextWithAuthData<R extends functions.https.CallableContext>(context: functions.https.CallableContext): asserts context is CallableContextWithAuthData<R>;
|
|
@@ -26,7 +26,7 @@ export declare const UNAVAILABLE_ERROR_CODE = "UNAVAILABLE";
|
|
|
26
26
|
export declare function unavailableError(messageOrError?: ErrorMessageOrPartialServerError): HttpsError;
|
|
27
27
|
export declare const INTERNAL_SERVER_ERROR_CODE = "INTERNAL_ERROR";
|
|
28
28
|
export declare function internalServerError(messageOrError?: ErrorMessageOrPartialServerError): HttpsError;
|
|
29
|
-
export
|
|
29
|
+
export type FirebaseServerErrorInfoType = 'httpsError' | 'firebaseError' | 'unknown';
|
|
30
30
|
/**
|
|
31
31
|
* Server error information
|
|
32
32
|
*/
|
|
@@ -4,8 +4,8 @@ import { CallableFunction } from 'firebase-functions/v2/https';
|
|
|
4
4
|
/**
|
|
5
5
|
* Firebase Functions V1 - Union of firebase-functions HttpsFunction and Runnable.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type RunnableHttpFunction<I> = HttpsFunction & Runnable<I>;
|
|
8
8
|
/**
|
|
9
9
|
* Firebase Functions V2 - CallableFunction with output as an optional type.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type CallableHttpFunction<I, O = unknown> = CallableFunction<I, PromiseOrValue<O>>;
|
package/src/lib/nest/app.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface NestServer {
|
|
|
8
8
|
server: express.Express;
|
|
9
9
|
nest: NestAppPromiseGetter;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type NestAppPromiseGetter = Getter<Promise<INestApplicationContext>>;
|
|
12
12
|
export interface NestServerInstance<T> {
|
|
13
13
|
/**
|
|
14
14
|
* Root module class of the app.
|
|
@@ -29,7 +29,7 @@ export interface NestServerInstance<T> {
|
|
|
29
29
|
}
|
|
30
30
|
export declare class FirebaseNestServerRootModule {
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type ConfigureNestServerInstanceFunction = (nestApp: INestApplication) => INestApplication | void;
|
|
33
33
|
export interface NestServerInstanceConfig<T> {
|
|
34
34
|
/**
|
|
35
35
|
* Module to instantiate.
|
package/src/lib/nest/app.js
CHANGED
|
@@ -40,7 +40,7 @@ function nestServerInstance(config) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
if (additionalProviders) {
|
|
43
|
-
(0, util_1.
|
|
43
|
+
(0, util_1.pushItemOrArrayItemsIntoArray)(providers, additionalProviders);
|
|
44
44
|
}
|
|
45
45
|
const imports = [moduleClass];
|
|
46
46
|
// NOTE: https://cloud.google.com/functions/docs/writing/http#parsing_http_requests
|
package/src/lib/nest/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../../../../packages/firebase-server/src/lib/nest/app.ts"],"names":[],"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lHD,gDAkHC"}
|
|
@@ -11,10 +11,10 @@ export declare const FIREBASE_AUTH_TOKEN: InjectionToken;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class FirebaseServerAuthModule {
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ProvideFirebaseServerAuthServiceSimple<T extends FirebaseServerAuthService> = Pick<FactoryProvider<T>, 'provide'> & {
|
|
15
15
|
useFactory: (auth: admin.auth.Auth) => T;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type ProvideFirebaseServerAuthService<T extends FirebaseServerAuthService> = FactoryProvider<T> | ProvideFirebaseServerAuthServiceSimple<T>;
|
|
18
18
|
export declare function provideFirebaseServerAuthService<T extends FirebaseServerAuthService>(provider: ProvideFirebaseServerAuthService<T>): [ProvideFirebaseServerAuthService<T>, Provider<T>];
|
|
19
19
|
export interface FirebaseServerAuthModuleMetadataConfig<T extends FirebaseServerAuthService> extends AdditionalModuleMetadata {
|
|
20
20
|
readonly serviceProvider: ProvideFirebaseServerAuthService<T>;
|
|
@@ -14,9 +14,9 @@ exports.FIREBASE_AUTH_TOKEN = 'FIREBASE_AUTH_TOKEN';
|
|
|
14
14
|
/**
|
|
15
15
|
* Nest provider module for Firebase that provides a firestore, etc. from the firestore token.
|
|
16
16
|
*/
|
|
17
|
-
let FirebaseServerAuthModule = class FirebaseServerAuthModule {
|
|
17
|
+
let FirebaseServerAuthModule = exports.FirebaseServerAuthModule = class FirebaseServerAuthModule {
|
|
18
18
|
};
|
|
19
|
-
FirebaseServerAuthModule = tslib_1.__decorate([
|
|
19
|
+
exports.FirebaseServerAuthModule = FirebaseServerAuthModule = tslib_1.__decorate([
|
|
20
20
|
(0, common_1.Module)({
|
|
21
21
|
providers: [
|
|
22
22
|
{
|
|
@@ -28,7 +28,6 @@ FirebaseServerAuthModule = tslib_1.__decorate([
|
|
|
28
28
|
exports: [exports.FIREBASE_AUTH_TOKEN]
|
|
29
29
|
})
|
|
30
30
|
], FirebaseServerAuthModule);
|
|
31
|
-
exports.FirebaseServerAuthModule = FirebaseServerAuthModule;
|
|
32
31
|
function provideFirebaseServerAuthService(provider) {
|
|
33
32
|
var _a;
|
|
34
33
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/auth/auth.module.ts"],"names":[],"mappings":";;;;AACA,2CAAmG;AACnG,iEAAiE;AACjE,0DAAoE;AACpE,4CAAgF;AAEhF,eAAe;AACf;;GAEG;AACU,QAAA,mBAAmB,GAAmB,qBAAqB,CAAC;AAEzE;;GAEG;AAWI,IAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/auth/auth.module.ts"],"names":[],"mappings":";;;;AACA,2CAAmG;AACnG,iEAAiE;AACjE,0DAAoE;AACpE,4CAAgF;AAEhF,eAAe;AACf;;GAEG;AACU,QAAA,mBAAmB,GAAmB,qBAAqB,CAAC;AAEzE;;GAEG;AAWI,IAAM,wBAAwB,sCAA9B,MAAM,wBAAwB;CAAG,CAAA;mCAA3B,wBAAwB;IAVpC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,2BAAmB;gBAC5B,UAAU,EAAE,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE;gBAC9C,MAAM,EAAE,CAAC,oCAAkB,CAAC;aAC7B;SACF;QACD,OAAO,EAAE,CAAC,2BAAmB,CAAC;KAC/B,CAAC;GACW,wBAAwB,CAAG;AASxC,SAAgB,gCAAgC,CAAsC,QAA6C;;IACjI,OAAO;wCAEA,QAAQ,KACX,MAAM,EAAE,MAAC,QAA+B,CAAC,MAAM,mCAAI,CAAC,2BAAmB,CAAC;QAE1E;YACE,OAAO,EAAE,wCAAyB;YAClC,WAAW,EAAE,QAAQ,CAAC,OAAO;SAC9B;KACF,CAAC;AACJ,CAAC;AAXD,4EAWC;AAOD;;;;;;GAMG;AACH,SAAgB,gCAAgC,CAAsC,MAAiD;IACrI,OAAO,IAAA,4BAAmB,EACxB;QACE,OAAO,EAAE,CAAC,wBAAwB,CAAC;QACnC,OAAO,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;QACnE,SAAS,EAAE,gCAAgC,CAAC,MAAM,CAAC,eAAe,CAAC;KACpE,EACD,MAAM,CACP,CAAC;AACJ,CAAC;AATD,4EASC"}
|
|
@@ -6,4 +6,4 @@ export interface AssertDevelopmentRequestFunctionContext<N, I = unknown> {
|
|
|
6
6
|
/**
|
|
7
7
|
* Function that asserts something given the input request.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type AssertDevelopmentRequestFunction<N, I = unknown> = (context: AssertDevelopmentRequestFunctionContext<N, I>) => void;
|
|
@@ -3,8 +3,8 @@ import { OnCallDevelopmentParams, DevelopmentFirebaseFunctionSpecifierRef, Devel
|
|
|
3
3
|
import { OnCallWithNestContext } from '../function/call';
|
|
4
4
|
import { NestContextCallableRequest } from '../function/nest';
|
|
5
5
|
import { AssertDevelopmentRequestFunction } from './development.assert.function';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type OnCallDevelopmentFunction<N, I = unknown, O = unknown> = (request: NestContextCallableRequest<N, I> & DevelopmentFirebaseFunctionSpecifierRef) => PromiseOrValue<O>;
|
|
7
|
+
export type OnCallDevelopmentFunctionMap<N> = {
|
|
8
8
|
[key: string]: OnCallDevelopmentFunction<N, any, any>;
|
|
9
9
|
};
|
|
10
10
|
export interface OnCallDevelopmentConfig<N> {
|
|
@@ -5,8 +5,4 @@ export declare class DefaultFirebaseServerEnvService extends ServerEnvironmentSe
|
|
|
5
5
|
* Enabled when not in production and not in a testing environment.
|
|
6
6
|
*/
|
|
7
7
|
get developmentSchedulerEnabled(): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated use developerToolsEnabled instead.
|
|
10
|
-
*/
|
|
11
|
-
get isDevelopmentToolsEnabled(): boolean;
|
|
12
8
|
}
|
|
@@ -4,22 +4,15 @@ exports.DefaultFirebaseServerEnvService = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const nestjs_1 = require("@dereekb/nestjs");
|
|
6
6
|
const common_1 = require("@nestjs/common");
|
|
7
|
-
let DefaultFirebaseServerEnvService = class DefaultFirebaseServerEnvService extends nestjs_1.ServerEnvironmentService {
|
|
7
|
+
let DefaultFirebaseServerEnvService = exports.DefaultFirebaseServerEnvService = class DefaultFirebaseServerEnvService extends nestjs_1.ServerEnvironmentService {
|
|
8
8
|
/**
|
|
9
9
|
* Enabled when not in production and not in a testing environment.
|
|
10
10
|
*/
|
|
11
11
|
get developmentSchedulerEnabled() {
|
|
12
12
|
return !this.isProduction && !this.isTestingEnv;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated use developerToolsEnabled instead.
|
|
16
|
-
*/
|
|
17
|
-
get isDevelopmentToolsEnabled() {
|
|
18
|
-
return this.developerToolsEnabled;
|
|
19
|
-
}
|
|
20
14
|
};
|
|
21
|
-
DefaultFirebaseServerEnvService = tslib_1.__decorate([
|
|
15
|
+
exports.DefaultFirebaseServerEnvService = DefaultFirebaseServerEnvService = tslib_1.__decorate([
|
|
22
16
|
(0, common_1.Injectable)()
|
|
23
17
|
], DefaultFirebaseServerEnvService);
|
|
24
|
-
exports.DefaultFirebaseServerEnvService = DefaultFirebaseServerEnvService;
|
|
25
18
|
//# sourceMappingURL=env.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/env.service.ts"],"names":[],"mappings":";;;;AAAA,4CAA2D;AAC3D,2CAA4C;AAIrC,IAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"env.service.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/env.service.ts"],"names":[],"mappings":";;;;AAAA,4CAA2D;AAC3D,2CAA4C;AAIrC,IAAM,+BAA+B,6CAArC,MAAM,+BAAgC,SAAQ,iCAAwB;IAC3E;;OAEG;IACH,IAAI,2BAA2B;QAC7B,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAClD,CAAC;CACF,CAAA;0CAPY,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;GACA,+BAA+B,CAO3C"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./env.config"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./env.nest"), exports);
|
|
6
4
|
tslib_1.__exportStar(require("./env.service"), exports);
|
|
7
5
|
tslib_1.__exportStar(require("./env.util"), exports);
|
|
8
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/env/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,qDAA2B"}
|
|
@@ -19,7 +19,7 @@ export declare class FirebaseServerFirestoreModule {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare class FirebaseServerFirestoreContextModule {
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ProvideAppFirestoreCollectionsFactory<T> = (context: FirestoreContext) => T;
|
|
23
23
|
export interface ProvideAppFirestoreCollectionsConfig<T> {
|
|
24
24
|
provide: ClassLikeType<T>;
|
|
25
25
|
useFactory: ProvideAppFirestoreCollectionsFactory<T>;
|
|
@@ -17,9 +17,9 @@ exports.FIREBASE_FIRESTORE_CONTEXT_TOKEN = 'FIREBASE_FIRESTORE_CONTEXT_TOKEN';
|
|
|
17
17
|
/**
|
|
18
18
|
* Nest provider module for Firebase that provides a firestore, etc. from the firestore token.
|
|
19
19
|
*/
|
|
20
|
-
let FirebaseServerFirestoreModule = class FirebaseServerFirestoreModule {
|
|
20
|
+
let FirebaseServerFirestoreModule = exports.FirebaseServerFirestoreModule = class FirebaseServerFirestoreModule {
|
|
21
21
|
};
|
|
22
|
-
FirebaseServerFirestoreModule = tslib_1.__decorate([
|
|
22
|
+
exports.FirebaseServerFirestoreModule = FirebaseServerFirestoreModule = tslib_1.__decorate([
|
|
23
23
|
(0, common_1.Module)({
|
|
24
24
|
providers: [
|
|
25
25
|
{
|
|
@@ -31,13 +31,12 @@ FirebaseServerFirestoreModule = tslib_1.__decorate([
|
|
|
31
31
|
exports: [exports.FIREBASE_FIRESTORE_TOKEN]
|
|
32
32
|
})
|
|
33
33
|
], FirebaseServerFirestoreModule);
|
|
34
|
-
exports.FirebaseServerFirestoreModule = FirebaseServerFirestoreModule;
|
|
35
34
|
/**
|
|
36
35
|
* Nest provider module for firebase that includes the FirebaseServerFirestoreModule and provides a value for FIRESTORE_CONTEXT_TOKEN using the googleCloudFirestoreContextFactory.
|
|
37
36
|
*/
|
|
38
|
-
let FirebaseServerFirestoreContextModule = class FirebaseServerFirestoreContextModule {
|
|
37
|
+
let FirebaseServerFirestoreContextModule = exports.FirebaseServerFirestoreContextModule = class FirebaseServerFirestoreContextModule {
|
|
39
38
|
};
|
|
40
|
-
FirebaseServerFirestoreContextModule = tslib_1.__decorate([
|
|
39
|
+
exports.FirebaseServerFirestoreContextModule = FirebaseServerFirestoreContextModule = tslib_1.__decorate([
|
|
41
40
|
(0, common_1.Module)({
|
|
42
41
|
imports: [FirebaseServerFirestoreModule],
|
|
43
42
|
providers: [
|
|
@@ -50,7 +49,6 @@ FirebaseServerFirestoreContextModule = tslib_1.__decorate([
|
|
|
50
49
|
exports: [FirebaseServerFirestoreModule, exports.FIREBASE_FIRESTORE_CONTEXT_TOKEN]
|
|
51
50
|
})
|
|
52
51
|
], FirebaseServerFirestoreContextModule);
|
|
53
|
-
exports.FirebaseServerFirestoreContextModule = FirebaseServerFirestoreContextModule;
|
|
54
52
|
/**
|
|
55
53
|
* Used to configure a Nestjs provider for a FirestoreCollections-type object that is initialized with a FirestoreContext.
|
|
56
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestore.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/firestore/firestore.module.ts"],"names":[],"mappings":";;;;AACA,2CAAkF;AAGlF,yDAA+E;AAC/E,iEAAiE;AAEjE,eAAe;AACf;;GAEG;AACU,QAAA,wBAAwB,GAAmB,0BAA0B,CAAC;AAEnF;;GAEG;AACU,QAAA,gCAAgC,GAAmB,kCAAkC,CAAC;AAEnG;;GAEG;AAWI,IAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"firestore.module.js","sourceRoot":"","sources":["../../../../../../../packages/firebase-server/src/lib/nest/firestore/firestore.module.ts"],"names":[],"mappings":";;;;AACA,2CAAkF;AAGlF,yDAA+E;AAC/E,iEAAiE;AAEjE,eAAe;AACf;;GAEG;AACU,QAAA,wBAAwB,GAAmB,0BAA0B,CAAC;AAEnF;;GAEG;AACU,QAAA,gCAAgC,GAAmB,kCAAkC,CAAC;AAEnG;;GAEG;AAWI,IAAM,6BAA6B,2CAAnC,MAAM,6BAA6B;CAAG,CAAA;wCAAhC,6BAA6B;IAVzC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,gCAAwB;gBACjC,UAAU,EAAE,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE;gBACnD,MAAM,EAAE,CAAC,oCAAkB,CAAC;aAC7B;SACF;QACD,OAAO,EAAE,CAAC,gCAAwB,CAAC;KACpC,CAAC;GACW,6BAA6B,CAAG;AAE7C;;GAEG;AAYI,IAAM,oCAAoC,kDAA1C,MAAM,oCAAoC;CAAG,CAAA;+CAAvC,oCAAoC;IAXhD,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,6BAA6B,CAAC;QACxC,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,wCAAgC;gBACzC,UAAU,EAAE,8CAAkC;gBAC9C,MAAM,EAAE,CAAC,gCAAwB,CAAC;aACnC;SACF;QACD,OAAO,EAAE,CAAC,6BAA6B,EAAE,wCAAgC,CAAC;KAC3E,CAAC;GACW,oCAAoC,CAAG;AAUpD;;;;;;GAMG;AACH,SAAgB,8BAA8B,CAAI,EAAE,OAAO,EAAE,UAAU,EAA2C;IAChH,OAAO;QACL;YACE,OAAO;YACP,UAAU;YACV,MAAM,EAAE,CAAC,wCAAgC,CAAC;SAC3C;KACF,CAAC;AACJ,CAAC;AARD,wEAQC;AAKD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CAAI,MAAkD;;IAC9F,OAAO;QACL,OAAO,EAAE,CAAC,oCAAoC,EAAE,GAAG,CAAC,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC;QAC1E,OAAO,EAAE,CAAC,oCAAoC,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC;QAC1F,SAAS,EAAE,CAAC,GAAG,8BAA8B,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,MAAA,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC,CAAC;KACpF,CAAC;AACJ,CAAC;AAND,gEAMC"}
|
|
@@ -2,18 +2,18 @@ import { PromiseOrValue } from '@dereekb/util';
|
|
|
2
2
|
import { CallableRequest } from 'firebase-functions/lib/common/providers/https';
|
|
3
3
|
import { NestApplicationContextRequest, NestContextCallableRequest, NestContextCallableRequestWithAuth } from './nest';
|
|
4
4
|
import { MakeNestContext } from '../nest.provider';
|
|
5
|
-
export
|
|
5
|
+
export type OnCallWithNestApplicationRequest<I> = NestApplicationContextRequest<CallableRequest<I>>;
|
|
6
6
|
/**
|
|
7
7
|
* Runnable function that is passed an INestApplicationContext in addition to the usual data/context provided by firebase.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type OnCallWithNestApplication<I = unknown, O = unknown> = (request: OnCallWithNestApplicationRequest<I>) => PromiseOrValue<O>;
|
|
10
|
+
export type OnCallWithNestContextRequest<N, I> = NestContextCallableRequest<N, I>;
|
|
11
11
|
/**
|
|
12
12
|
* Runnable function that is passed an arbitrary nest context object in addition to the usual data/context provided by firebase.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type OnCallWithNestContext<N, I = unknown, O = unknown> = (request: OnCallWithNestContextRequest<N, I>) => PromiseOrValue<O>;
|
|
15
15
|
export declare function setNestContextOnRequest<N, I>(makeNestContext: MakeNestContext<N>, request: OnCallWithNestApplicationRequest<I>): OnCallWithNestContextRequest<N, I>;
|
|
16
|
-
export
|
|
16
|
+
export type OnCallWithAuthorizedNestContext<N, I = unknown, O = unknown> = (request: NestContextCallableRequestWithAuth<N, I>) => PromiseOrValue<O>;
|
|
17
17
|
/**
|
|
18
18
|
* Creates an OnCallWithNestContext wrapper that validates the input CallableContext to assert the context has auth data before entering the function.
|
|
19
19
|
*
|
|
@@ -2,14 +2,14 @@ import { TransformAndValidateFunctionResultFactory, TransformAndValidateObjectFa
|
|
|
2
2
|
/**
|
|
3
3
|
* Context used for building FirebaseServerActions. It contains references to reusable factories.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type FirebaseServerActionsContext = FirebaseServerActionsTransformContext;
|
|
6
6
|
export declare abstract class AbstractFirebaseServerActionsContext implements FirebaseServerActionsContext {
|
|
7
7
|
abstract readonly firebaseServerActionTransformFactory: TransformAndValidateObjectFactory;
|
|
8
8
|
abstract readonly firebaseServerActionTransformFunctionFactory: TransformAndValidateFunctionResultFactory<unknown>;
|
|
9
9
|
}
|
|
10
10
|
export declare function firebaseServerActionsContext(logError?: FirebaseServerActionsTransformFactoryLogErrorFunctionInput): FirebaseServerActionsContext;
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type FirebaseServerActionsTransformFactoryLogErrorFunction = (details: object) => void;
|
|
12
|
+
export type FirebaseServerActionsTransformFactoryLogErrorFunctionInput = FirebaseServerActionsTransformFactoryLogErrorFunction | boolean;
|
|
13
13
|
export declare const defaultFirebaseServerActionsTransformFactoryLogErrorFunction: FirebaseServerActionsTransformFactoryLogErrorFunction;
|
|
14
14
|
/**
|
|
15
15
|
* Context used for transforming content.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { INestApplicationContext } from '@nestjs/common';
|
|
2
2
|
import { CallableRequest } from 'firebase-functions/lib/common/providers/https';
|
|
3
3
|
import { CallableContextWithAuthData } from '../../function/context';
|
|
4
|
-
export
|
|
4
|
+
export type NestApplicationContextRequest<R> = R & {
|
|
5
5
|
readonly nestApplication: INestApplicationContext;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type NestRef<N> = {
|
|
8
8
|
readonly nest: N;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type NestContextRequest<N, R> = R & {
|
|
11
11
|
readonly nest: N;
|
|
12
12
|
};
|
|
13
13
|
export declare function injectNestIntoRequest<N, R>(nest: N, request: R): NestContextRequest<N, R>;
|
|
14
14
|
export declare function injectNestApplicationContextIntoRequest<R>(nestContext: INestApplicationContext, request: R): NestApplicationContextRequest<R>;
|
|
15
|
-
export
|
|
15
|
+
export type NestContextCallableRequest<N, I> = NestContextRequest<N, CallableRequest<I>>;
|
|
16
16
|
/**
|
|
17
17
|
* NestContextCallableRequest that has valid auth attached to it.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type NestContextCallableRequestWithAuth<N, I> = CallableContextWithAuthData<NestContextCallableRequest<N, I>>;
|