@quatrain/cloudwrapper-firebase 0.1.1 → 0.1.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpsOptions } from 'firebase-functions/v2/https';
|
|
1
|
+
import { HttpsFunction, HttpsOptions } from 'firebase-functions/v2/https';
|
|
2
2
|
import { AbstractCloudWrapper, BackendAction } from '@quatrain/core';
|
|
3
3
|
export type FirebaseParams = {
|
|
4
4
|
region?: string;
|
|
@@ -7,7 +7,7 @@ export type FirebaseParams = {
|
|
|
7
7
|
export declare class FirebaseCloudWrapper extends AbstractCloudWrapper {
|
|
8
8
|
protected _isInitialized: boolean;
|
|
9
9
|
constructor(params: FirebaseParams);
|
|
10
|
-
httpsWrapper(func: any, params?: HttpsOptions):
|
|
10
|
+
httpsWrapper(func: any, params?: HttpsOptions): HttpsFunction;
|
|
11
11
|
databaseWrapper(func: any, eventType: BackendAction, rule?: string): import("firebase-functions/v2").CloudFunction<import("firebase-functions/v2/firestore").FirestoreEvent<import("firebase-functions/v2/firestore").QueryDocumentSnapshot | undefined, Record<string, string>>> | import("firebase-functions/v2").CloudFunction<import("firebase-functions/v2/firestore").FirestoreEvent<import("firebase-functions/v2").Change<import("firebase-functions/v2/firestore").QueryDocumentSnapshot> | undefined, Record<string, string>>>;
|
|
12
12
|
protected _initialize(): void;
|
|
13
13
|
}
|
|
@@ -34,6 +34,10 @@ class FirebaseCloudWrapper extends core_1.AbstractCloudWrapper {
|
|
|
34
34
|
throw new Error(`Unknown event type '${eventType}'`);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
// getConfig(key?:string) {
|
|
38
|
+
// const config = functions.config()
|
|
39
|
+
// return key ? config[key] : config
|
|
40
|
+
// }
|
|
37
41
|
_initialize() {
|
|
38
42
|
if (this._isInitialized === false) {
|
|
39
43
|
if (this._params.useEmulator === true) {
|