firebase-admin 11.2.1 → 11.4.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/lib/app/core.d.ts +1 -1
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +1 -1
- package/lib/app/credential-factory.js +1 -1
- package/lib/app/credential-internal.d.ts +1 -1
- package/lib/app/credential-internal.js +1 -1
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +1 -1
- package/lib/app/firebase-app.js +1 -1
- package/lib/app/firebase-namespace.d.ts +1 -1
- package/lib/app/firebase-namespace.js +1 -1
- package/lib/app/index.d.ts +1 -1
- package/lib/app/index.js +1 -1
- package/lib/app/lifecycle.d.ts +1 -1
- package/lib/app/lifecycle.js +1 -1
- package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
- package/lib/app-check/app-check-api-client-internal.js +1 -1
- package/lib/app-check/app-check-api.d.ts +1 -1
- package/lib/app-check/app-check-api.js +1 -1
- package/lib/app-check/app-check-namespace.d.ts +1 -1
- package/lib/app-check/app-check-namespace.js +1 -1
- package/lib/app-check/app-check.d.ts +1 -1
- package/lib/app-check/app-check.js +1 -1
- package/lib/app-check/index.d.ts +1 -1
- package/lib/app-check/index.js +1 -1
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +1 -1
- package/lib/app-check/token-verifier.d.ts +1 -1
- package/lib/app-check/token-verifier.js +1 -1
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +1 -1
- package/lib/auth/auth-api-request.d.ts +1 -1
- package/lib/auth/auth-api-request.js +1 -1
- package/lib/auth/auth-config.d.ts +1 -1
- package/lib/auth/auth-config.js +1 -1
- package/lib/auth/auth-namespace.d.ts +1 -1
- package/lib/auth/auth-namespace.js +1 -1
- package/lib/auth/auth.d.ts +1 -1
- package/lib/auth/auth.js +1 -1
- package/lib/auth/base-auth.d.ts +1 -1
- package/lib/auth/base-auth.js +1 -1
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +1 -1
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/index.js +1 -1
- package/lib/auth/project-config-manager.d.ts +1 -1
- package/lib/auth/project-config-manager.js +1 -1
- package/lib/auth/project-config.d.ts +1 -1
- package/lib/auth/project-config.js +1 -1
- package/lib/auth/tenant-manager.d.ts +1 -1
- package/lib/auth/tenant-manager.js +1 -1
- package/lib/auth/tenant.d.ts +1 -1
- package/lib/auth/tenant.js +1 -1
- package/lib/auth/token-generator.d.ts +1 -1
- package/lib/auth/token-generator.js +1 -1
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +1 -1
- package/lib/auth/user-import-builder.d.ts +1 -1
- package/lib/auth/user-import-builder.js +1 -1
- package/lib/auth/user-record.d.ts +1 -1
- package/lib/auth/user-record.js +1 -1
- package/lib/credential/index.d.ts +1 -1
- package/lib/credential/index.js +1 -1
- package/lib/database/database-namespace.d.ts +1 -1
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +1 -1
- package/lib/database/database.js +1 -1
- package/lib/database/index.d.ts +1 -1
- package/lib/database/index.js +1 -1
- package/lib/default-namespace.d.ts +1 -1
- package/lib/default-namespace.js +1 -1
- package/lib/esm/extensions/index.js +5 -0
- package/lib/esm/firestore/index.js +1 -0
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +1 -1
- package/lib/eventarc/eventarc-utils.d.ts +1 -1
- package/lib/eventarc/eventarc-utils.js +1 -1
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +1 -1
- package/lib/eventarc/index.d.ts +1 -1
- package/lib/eventarc/index.js +1 -1
- package/lib/extensions/extensions-api-client-internal.d.ts +30 -0
- package/lib/extensions/extensions-api-client-internal.js +105 -0
- package/lib/extensions/extensions-api.d.ts +44 -0
- package/lib/extensions/extensions-api.js +19 -0
- package/lib/extensions/extensions.d.ts +73 -0
- package/lib/extensions/extensions.js +122 -0
- package/lib/extensions/index.d.ts +53 -0
- package/lib/extensions/index.js +64 -0
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +1 -1
- package/lib/firestore/firestore-internal.d.ts +24 -3
- package/lib/firestore/firestore-internal.js +34 -7
- package/lib/firestore/firestore-namespace.d.ts +1 -1
- package/lib/firestore/firestore-namespace.js +1 -1
- package/lib/firestore/index.d.ts +22 -2
- package/lib/firestore/index.js +10 -2
- package/lib/functions/functions-api-client-internal.d.ts +1 -1
- package/lib/functions/functions-api-client-internal.js +1 -1
- package/lib/functions/functions-api.d.ts +1 -1
- package/lib/functions/functions-api.js +1 -1
- package/lib/functions/functions.d.ts +1 -1
- package/lib/functions/functions.js +1 -1
- package/lib/functions/index.d.ts +1 -1
- package/lib/functions/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/installations/index.d.ts +1 -1
- package/lib/installations/index.js +1 -1
- package/lib/installations/installations-namespace.d.ts +1 -1
- package/lib/installations/installations-namespace.js +1 -1
- package/lib/installations/installations-request-handler.d.ts +1 -1
- package/lib/installations/installations-request-handler.js +1 -1
- package/lib/installations/installations.d.ts +1 -1
- package/lib/installations/installations.js +1 -1
- package/lib/instance-id/index.d.ts +1 -1
- package/lib/instance-id/index.js +1 -1
- package/lib/instance-id/instance-id-namespace.d.ts +1 -1
- package/lib/instance-id/instance-id-namespace.js +1 -1
- package/lib/instance-id/instance-id.d.ts +1 -1
- package/lib/instance-id/instance-id.js +1 -1
- package/lib/machine-learning/index.d.ts +1 -1
- package/lib/machine-learning/index.js +1 -1
- package/lib/machine-learning/machine-learning-api-client.d.ts +4 -1
- package/lib/machine-learning/machine-learning-api-client.js +1 -1
- package/lib/machine-learning/machine-learning-namespace.d.ts +3 -1
- package/lib/machine-learning/machine-learning-namespace.js +1 -1
- package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
- package/lib/machine-learning/machine-learning-utils.js +1 -1
- package/lib/machine-learning/machine-learning.d.ts +3 -1
- package/lib/machine-learning/machine-learning.js +1 -1
- package/lib/messaging/batch-request-internal.d.ts +1 -1
- package/lib/messaging/batch-request-internal.js +2 -2
- package/lib/messaging/index.d.ts +1 -1
- package/lib/messaging/index.js +1 -1
- package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
- package/lib/messaging/messaging-api-request-internal.js +1 -1
- package/lib/messaging/messaging-api.d.ts +1 -1
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +1 -1
- package/lib/messaging/messaging-errors-internal.js +1 -1
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +1 -1
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +1 -1
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +1 -1
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +1 -1
- package/lib/project-management/index.js +1 -1
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +1 -1
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +1 -1
- package/lib/project-management/project-management-namespace.d.ts +1 -1
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +1 -1
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +1 -1
- package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +1 -1
- package/lib/remote-config/remote-config-api.d.ts +1 -1
- package/lib/remote-config/remote-config-api.js +1 -1
- package/lib/remote-config/remote-config-namespace.d.ts +1 -1
- package/lib/remote-config/remote-config-namespace.js +1 -1
- package/lib/remote-config/remote-config.d.ts +1 -1
- package/lib/remote-config/remote-config.js +1 -1
- package/lib/security-rules/index.d.ts +1 -1
- package/lib/security-rules/index.js +1 -1
- package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-api-client-internal.js +1 -1
- package/lib/security-rules/security-rules-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-internal.js +1 -1
- package/lib/security-rules/security-rules-namespace.d.ts +1 -1
- package/lib/security-rules/security-rules-namespace.js +1 -1
- package/lib/security-rules/security-rules.d.ts +1 -1
- package/lib/security-rules/security-rules.js +1 -1
- package/lib/storage/index.d.ts +1 -1
- package/lib/storage/index.js +1 -1
- package/lib/storage/storage-namespace.d.ts +1 -1
- package/lib/storage/storage-namespace.js +1 -1
- package/lib/storage/storage.d.ts +1 -1
- package/lib/storage/storage.js +1 -1
- package/lib/utils/api-request.d.ts +1 -1
- package/lib/utils/api-request.js +6 -1
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +1 -1
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +1 -1
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +1 -1
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
/*!
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022 Google Inc.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { PrefixedFirebaseError } from '../utils/error';
|
|
19
|
+
declare type ExtensionsErrorCode = 'invalid-argument' | 'not-found' | 'forbidden' | 'internal-error' | 'unknown-error';
|
|
20
|
+
/**
|
|
21
|
+
* Firebase Extensions error code structure. This extends PrefixedFirebaseError.
|
|
22
|
+
*
|
|
23
|
+
* @param code - The error code.
|
|
24
|
+
* @param message - The error message.
|
|
25
|
+
* @constructor
|
|
26
|
+
*/
|
|
27
|
+
export declare class FirebaseExtensionsError extends PrefixedFirebaseError {
|
|
28
|
+
constructor(code: ExtensionsErrorCode, message: string);
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2022 Google Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.FirebaseExtensionsError = exports.ExtensionsApiClient = void 0;
|
|
21
|
+
const api_request_1 = require("../utils/api-request");
|
|
22
|
+
const error_1 = require("../utils/error");
|
|
23
|
+
const validator = require("../utils/validator");
|
|
24
|
+
const utils = require("../utils");
|
|
25
|
+
const FIREBASE_FUNCTIONS_CONFIG_HEADERS = {
|
|
26
|
+
'X-Firebase-Client': `fire-admin-node/${utils.getSdkVersion()}`
|
|
27
|
+
};
|
|
28
|
+
const EXTENSIONS_API_VERSION = 'v1beta';
|
|
29
|
+
// Note - use getExtensionsApiUri() instead so that changing environments is consistent.
|
|
30
|
+
const EXTENSIONS_URL = 'https://firebaseextensions.googleapis.com';
|
|
31
|
+
/**
|
|
32
|
+
* Class that facilitates sending requests to the Firebase Extensions backend API.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
class ExtensionsApiClient {
|
|
37
|
+
constructor(app) {
|
|
38
|
+
this.app = app;
|
|
39
|
+
if (!validator.isNonNullObject(app) || !('options' in app)) {
|
|
40
|
+
throw new error_1.FirebaseAppError('invalid-argument', 'First argument passed to getExtensions() must be a valid Firebase app instance.');
|
|
41
|
+
}
|
|
42
|
+
this.httpClient = new api_request_1.AuthorizedHttpClient(this.app);
|
|
43
|
+
}
|
|
44
|
+
async updateRuntimeData(projectId, instanceId, runtimeData) {
|
|
45
|
+
const url = this.getRuntimeDataUri(projectId, instanceId);
|
|
46
|
+
const request = {
|
|
47
|
+
method: 'PATCH',
|
|
48
|
+
url,
|
|
49
|
+
headers: FIREBASE_FUNCTIONS_CONFIG_HEADERS,
|
|
50
|
+
data: runtimeData,
|
|
51
|
+
};
|
|
52
|
+
try {
|
|
53
|
+
const res = await this.httpClient.send(request);
|
|
54
|
+
return res.data;
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
throw this.toFirebaseError(err);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
getExtensionsApiUri() {
|
|
61
|
+
return process.env['FIREBASE_EXT_URL'] ?? EXTENSIONS_URL;
|
|
62
|
+
}
|
|
63
|
+
getRuntimeDataUri(projectId, instanceId) {
|
|
64
|
+
return `${this.getExtensionsApiUri()}/${EXTENSIONS_API_VERSION}/projects/${projectId}/instances/${instanceId}/runtimeData`;
|
|
65
|
+
}
|
|
66
|
+
toFirebaseError(err) {
|
|
67
|
+
if (err instanceof error_1.PrefixedFirebaseError) {
|
|
68
|
+
return err;
|
|
69
|
+
}
|
|
70
|
+
const response = err.response;
|
|
71
|
+
if (!response?.isJson()) {
|
|
72
|
+
return new FirebaseExtensionsError('unknown-error', `Unexpected response with status: ${response.status} and body: ${response.text}`);
|
|
73
|
+
}
|
|
74
|
+
const error = response.data?.error;
|
|
75
|
+
const message = error?.message || `Unknown server error: ${response.text}`;
|
|
76
|
+
switch (error.code) {
|
|
77
|
+
case 403:
|
|
78
|
+
return new FirebaseExtensionsError('forbidden', message);
|
|
79
|
+
case 404:
|
|
80
|
+
return new FirebaseExtensionsError('not-found', message);
|
|
81
|
+
case 500:
|
|
82
|
+
return new FirebaseExtensionsError('internal-error', message);
|
|
83
|
+
}
|
|
84
|
+
return new FirebaseExtensionsError('unknown-error', message);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.ExtensionsApiClient = ExtensionsApiClient;
|
|
88
|
+
/**
|
|
89
|
+
* Firebase Extensions error code structure. This extends PrefixedFirebaseError.
|
|
90
|
+
*
|
|
91
|
+
* @param code - The error code.
|
|
92
|
+
* @param message - The error message.
|
|
93
|
+
* @constructor
|
|
94
|
+
*/
|
|
95
|
+
class FirebaseExtensionsError extends error_1.PrefixedFirebaseError {
|
|
96
|
+
constructor(code, message) {
|
|
97
|
+
super('Extensions', code, message);
|
|
98
|
+
/* tslint:disable:max-line-length */
|
|
99
|
+
// Set the prototype explicitly. See the following link for more details:
|
|
100
|
+
// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
101
|
+
/* tslint:enable:max-line-length */
|
|
102
|
+
this.__proto__ = FirebaseExtensionsError.prototype;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.FirebaseExtensionsError = FirebaseExtensionsError;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
/*!
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022 Google Inc.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* `SettableProcessingState` represents all the processing states that can be set
|
|
20
|
+
* on an Extension instance's runtime data.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* You can set the following states:
|
|
24
|
+
*
|
|
25
|
+
* - `NONE`: No relevant lifecycle event work has been done.
|
|
26
|
+
* Set this to clear out old statuses.
|
|
27
|
+
*
|
|
28
|
+
* - `PROCESSING_COMPLETE`: Lifecycle event work completed with no errors.
|
|
29
|
+
*
|
|
30
|
+
* - `PROCESSING_WARNING`: Lifecycle event work succeeded partially, or
|
|
31
|
+
* something happened that the user should be warned about.
|
|
32
|
+
*
|
|
33
|
+
* - `PROCESSING_FAILED`: Lifecycle event work failed completely, but the
|
|
34
|
+
* instance will still work correctly going forward.
|
|
35
|
+
*
|
|
36
|
+
* If the extension instance is in a broken state due to errors, instead call
|
|
37
|
+
* {@link Runtime.setFatalError}.
|
|
38
|
+
*
|
|
39
|
+
* The "processing" state gets set automatically when a lifecycle event handler
|
|
40
|
+
* starts; you can't set it explicitly.
|
|
41
|
+
* To report the ongoing status of an extension's function, use `console.log`
|
|
42
|
+
* or the Cloud Functions logger SDK.
|
|
43
|
+
*/
|
|
44
|
+
export declare type SettableProcessingState = 'NONE' | 'PROCESSING_COMPLETE' | 'PROCESSING_WARNING' | 'PROCESSING_FAILED';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2022 Google Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
/*!
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022 Google Inc.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { App } from '../app';
|
|
19
|
+
import { SettableProcessingState } from './extensions-api';
|
|
20
|
+
/**
|
|
21
|
+
* The Firebase `Extensions` service interface.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Extensions {
|
|
24
|
+
readonly app: App;
|
|
25
|
+
private readonly client;
|
|
26
|
+
/**
|
|
27
|
+
* The runtime() method returns a new Runtime, which provides methods to modify an extension instance's runtime data.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This method will throw an error if called outside an Extensions environment.
|
|
31
|
+
*
|
|
32
|
+
* @returns A new {@link Runtime} object.
|
|
33
|
+
*/
|
|
34
|
+
runtime(): Runtime;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Runtime provides methods to modify an extension instance's runtime data.
|
|
38
|
+
*/
|
|
39
|
+
export declare class Runtime {
|
|
40
|
+
private projectId;
|
|
41
|
+
private extensionInstanceId;
|
|
42
|
+
private readonly client;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the processing state of an extension instance.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Use this method to report the results of a lifecycle event handler.
|
|
48
|
+
*
|
|
49
|
+
* If the lifecycle event failed & the extension instance will no longer work
|
|
50
|
+
* correctly, use {@link Runtime.setFatalError} instead.
|
|
51
|
+
*
|
|
52
|
+
* To report the status of function calls other than lifecycle event handlers,
|
|
53
|
+
* use `console.log` or the Cloud Functions logger SDK.
|
|
54
|
+
*
|
|
55
|
+
* @param state - The state to set the instance to.
|
|
56
|
+
* @param detailMessage - A message explaining the results of the lifecycle function.
|
|
57
|
+
*/
|
|
58
|
+
setProcessingState(state: SettableProcessingState, detailMessage: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Reports a fatal error while running a lifecycle event handler.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* Call this method when a lifecycle event handler fails in a way that makes
|
|
64
|
+
* the Instance inoperable.
|
|
65
|
+
* If the lifecycle event failed but the instance will still work as expected,
|
|
66
|
+
* call `setProcessingState` with the "PROCESSING_WARNING" or
|
|
67
|
+
* "PROCESSING_FAILED" state instead.
|
|
68
|
+
*
|
|
69
|
+
* @param errorMessage - A message explaining what went wrong and how to fix it.
|
|
70
|
+
*/
|
|
71
|
+
setFatalError(errorMessage: string): Promise<void>;
|
|
72
|
+
private getProjectId;
|
|
73
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2022 Google Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.Runtime = exports.Extensions = void 0;
|
|
21
|
+
const extensions_api_client_internal_1 = require("./extensions-api-client-internal");
|
|
22
|
+
const validator = require("../utils/validator");
|
|
23
|
+
/**
|
|
24
|
+
* The Firebase `Extensions` service interface.
|
|
25
|
+
*/
|
|
26
|
+
class Extensions {
|
|
27
|
+
/**
|
|
28
|
+
* @param app - The app for this `Extensions` service.
|
|
29
|
+
* @constructor
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
constructor(app) {
|
|
33
|
+
this.app = app;
|
|
34
|
+
this.client = new extensions_api_client_internal_1.ExtensionsApiClient(app);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The runtime() method returns a new Runtime, which provides methods to modify an extension instance's runtime data.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This method will throw an error if called outside an Extensions environment.
|
|
41
|
+
*
|
|
42
|
+
* @returns A new {@link Runtime} object.
|
|
43
|
+
*/
|
|
44
|
+
runtime() {
|
|
45
|
+
return new Runtime(this.client);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.Extensions = Extensions;
|
|
49
|
+
/**
|
|
50
|
+
* Runtime provides methods to modify an extension instance's runtime data.
|
|
51
|
+
*/
|
|
52
|
+
class Runtime {
|
|
53
|
+
/**
|
|
54
|
+
* @param client - The API client for this `Runtime` service.
|
|
55
|
+
* @constructor
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
constructor(client) {
|
|
59
|
+
this.projectId = this.getProjectId();
|
|
60
|
+
if (!validator.isNonEmptyString(process.env['EXT_INSTANCE_ID'])) {
|
|
61
|
+
throw new extensions_api_client_internal_1.FirebaseExtensionsError('invalid-argument', 'Runtime is only available from within a running Extension instance.');
|
|
62
|
+
}
|
|
63
|
+
this.extensionInstanceId = process.env['EXT_INSTANCE_ID'];
|
|
64
|
+
if (!validator.isNonNullObject(client) || !('updateRuntimeData' in client)) {
|
|
65
|
+
throw new extensions_api_client_internal_1.FirebaseExtensionsError('invalid-argument', 'Must provide a valid ExtensionsApiClient instance to create a new Runtime.');
|
|
66
|
+
}
|
|
67
|
+
this.client = client;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Sets the processing state of an extension instance.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Use this method to report the results of a lifecycle event handler.
|
|
74
|
+
*
|
|
75
|
+
* If the lifecycle event failed & the extension instance will no longer work
|
|
76
|
+
* correctly, use {@link Runtime.setFatalError} instead.
|
|
77
|
+
*
|
|
78
|
+
* To report the status of function calls other than lifecycle event handlers,
|
|
79
|
+
* use `console.log` or the Cloud Functions logger SDK.
|
|
80
|
+
*
|
|
81
|
+
* @param state - The state to set the instance to.
|
|
82
|
+
* @param detailMessage - A message explaining the results of the lifecycle function.
|
|
83
|
+
*/
|
|
84
|
+
async setProcessingState(state, detailMessage) {
|
|
85
|
+
await this.client.updateRuntimeData(this.projectId, this.extensionInstanceId, {
|
|
86
|
+
processingState: {
|
|
87
|
+
state,
|
|
88
|
+
detailMessage,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Reports a fatal error while running a lifecycle event handler.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* Call this method when a lifecycle event handler fails in a way that makes
|
|
97
|
+
* the Instance inoperable.
|
|
98
|
+
* If the lifecycle event failed but the instance will still work as expected,
|
|
99
|
+
* call `setProcessingState` with the "PROCESSING_WARNING" or
|
|
100
|
+
* "PROCESSING_FAILED" state instead.
|
|
101
|
+
*
|
|
102
|
+
* @param errorMessage - A message explaining what went wrong and how to fix it.
|
|
103
|
+
*/
|
|
104
|
+
async setFatalError(errorMessage) {
|
|
105
|
+
if (!validator.isNonEmptyString(errorMessage)) {
|
|
106
|
+
throw new extensions_api_client_internal_1.FirebaseExtensionsError('invalid-argument', 'errorMessage must not be empty');
|
|
107
|
+
}
|
|
108
|
+
await this.client.updateRuntimeData(this.projectId, this.extensionInstanceId, {
|
|
109
|
+
fatalError: {
|
|
110
|
+
errorMessage,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
getProjectId() {
|
|
115
|
+
const projectId = process.env['PROJECT_ID'];
|
|
116
|
+
if (!validator.isNonEmptyString(projectId)) {
|
|
117
|
+
throw new extensions_api_client_internal_1.FirebaseExtensionsError('invalid-argument', 'PROJECT_ID must not be undefined in Extensions runtime environment');
|
|
118
|
+
}
|
|
119
|
+
return projectId;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.Runtime = Runtime;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
/*!
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2021 Google Inc.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Firebase Extensions service.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import { App } from '../app';
|
|
24
|
+
import { Extensions } from './extensions';
|
|
25
|
+
export { Extensions, Runtime } from './extensions';
|
|
26
|
+
export { SettableProcessingState } from './extensions-api';
|
|
27
|
+
/**
|
|
28
|
+
* Gets the {@link Extensions} service for the default app
|
|
29
|
+
* or a given app.
|
|
30
|
+
*
|
|
31
|
+
* `getExtensions()` can be called with no arguments to access the default
|
|
32
|
+
* app's `Extensions` service or as `getExtensions(app)` to access the
|
|
33
|
+
* `Extensions` service associated with a specific app.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```javascript
|
|
37
|
+
* // Get the `Extensions` service for the default app
|
|
38
|
+
* const defaultExtensions = getExtensions();
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```javascript
|
|
43
|
+
* // Get the `Extensions` service for a given app
|
|
44
|
+
* const otherExtensions = getExtensions(otherApp);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param app - Optional app for which to return the `Extensions` service.
|
|
48
|
+
* If not provided, the default `Extensions` service is returned.
|
|
49
|
+
*
|
|
50
|
+
* @returns The default `Extensions` service if no app is provided, or the `Extensions`
|
|
51
|
+
* service associated with the provided app.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getExtensions(app?: App): Extensions;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2021 Google Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.getExtensions = exports.Runtime = exports.Extensions = void 0;
|
|
21
|
+
/**
|
|
22
|
+
* Firebase Extensions service.
|
|
23
|
+
*
|
|
24
|
+
* @packageDocumentation
|
|
25
|
+
*/
|
|
26
|
+
const app_1 = require("../app");
|
|
27
|
+
const extensions_1 = require("./extensions");
|
|
28
|
+
var extensions_2 = require("./extensions");
|
|
29
|
+
Object.defineProperty(exports, "Extensions", { enumerable: true, get: function () { return extensions_2.Extensions; } });
|
|
30
|
+
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return extensions_2.Runtime; } });
|
|
31
|
+
/**
|
|
32
|
+
* Gets the {@link Extensions} service for the default app
|
|
33
|
+
* or a given app.
|
|
34
|
+
*
|
|
35
|
+
* `getExtensions()` can be called with no arguments to access the default
|
|
36
|
+
* app's `Extensions` service or as `getExtensions(app)` to access the
|
|
37
|
+
* `Extensions` service associated with a specific app.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```javascript
|
|
41
|
+
* // Get the `Extensions` service for the default app
|
|
42
|
+
* const defaultExtensions = getExtensions();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```javascript
|
|
47
|
+
* // Get the `Extensions` service for a given app
|
|
48
|
+
* const otherExtensions = getExtensions(otherApp);
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param app - Optional app for which to return the `Extensions` service.
|
|
52
|
+
* If not provided, the default `Extensions` service is returned.
|
|
53
|
+
*
|
|
54
|
+
* @returns The default `Extensions` service if no app is provided, or the `Extensions`
|
|
55
|
+
* service associated with the provided app.
|
|
56
|
+
*/
|
|
57
|
+
function getExtensions(app) {
|
|
58
|
+
if (typeof app === 'undefined') {
|
|
59
|
+
app = (0, app_1.getApp)();
|
|
60
|
+
}
|
|
61
|
+
const firebaseApp = app;
|
|
62
|
+
return firebaseApp.getOrInitService('extensions', (app) => new extensions_1.Extensions(app));
|
|
63
|
+
}
|
|
64
|
+
exports.getExtensions = getExtensions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -17,11 +17,32 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { Firestore, Settings } from '@google-cloud/firestore';
|
|
19
19
|
import { App } from '../app';
|
|
20
|
+
/**
|
|
21
|
+
* Settings to pass to the Firestore constructor.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface FirestoreSettings {
|
|
26
|
+
/**
|
|
27
|
+
* Use HTTP/1.1 REST transport where possible.
|
|
28
|
+
*
|
|
29
|
+
* `preferRest` will force the use of HTTP/1.1 REST transport until a method
|
|
30
|
+
* that requires gRPC is called. When a method requires gRPC, this Firestore
|
|
31
|
+
* client will load dependent gRPC libraries and then use gRPC transport for
|
|
32
|
+
* all communication from that point forward. Currently the only operation
|
|
33
|
+
* that requires gRPC is creating a snapshot listener using `onSnapshot()`.
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue `undefined`
|
|
36
|
+
*/
|
|
37
|
+
preferRest?: boolean;
|
|
38
|
+
}
|
|
20
39
|
export declare class FirestoreService {
|
|
21
40
|
private readonly appInternal;
|
|
22
41
|
private readonly databases;
|
|
42
|
+
private readonly firestoreSettings;
|
|
23
43
|
constructor(app: App);
|
|
24
|
-
getDatabase(databaseId: string): Firestore;
|
|
44
|
+
getDatabase(databaseId: string, settings?: FirestoreSettings): Firestore;
|
|
45
|
+
private checkIfSameSettings;
|
|
25
46
|
/**
|
|
26
47
|
* Returns the app associated with this Storage instance.
|
|
27
48
|
*
|
|
@@ -29,4 +50,4 @@ export declare class FirestoreService {
|
|
|
29
50
|
*/
|
|
30
51
|
get app(): App;
|
|
31
52
|
}
|
|
32
|
-
export declare function getFirestoreOptions(app: App): Settings;
|
|
53
|
+
export declare function getFirestoreOptions(app: App, firestoreSettings?: FirestoreSettings): Settings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.4.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -25,16 +25,39 @@ const utils = require("../utils/index");
|
|
|
25
25
|
class FirestoreService {
|
|
26
26
|
constructor(app) {
|
|
27
27
|
this.databases = new Map();
|
|
28
|
+
this.firestoreSettings = new Map();
|
|
28
29
|
this.appInternal = app;
|
|
29
30
|
}
|
|
30
|
-
getDatabase(databaseId) {
|
|
31
|
+
getDatabase(databaseId, settings) {
|
|
32
|
+
settings ?? (settings = {});
|
|
31
33
|
let database = this.databases.get(databaseId);
|
|
32
34
|
if (database === undefined) {
|
|
33
|
-
database = initFirestore(this.app, databaseId);
|
|
35
|
+
database = initFirestore(this.app, databaseId, settings);
|
|
34
36
|
this.databases.set(databaseId, database);
|
|
37
|
+
this.firestoreSettings.set(databaseId, settings);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
if (!this.checkIfSameSettings(databaseId, settings)) {
|
|
41
|
+
throw new error_1.FirebaseFirestoreError({
|
|
42
|
+
code: 'failed-precondition',
|
|
43
|
+
message: 'initializeFirestore() has already been called with ' +
|
|
44
|
+
'different options. To avoid this error, call initializeFirestore() with the ' +
|
|
45
|
+
'same options as when it was originally called, or call getFirestore() to return the' +
|
|
46
|
+
' already initialized instance.'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
35
49
|
}
|
|
36
50
|
return database;
|
|
37
51
|
}
|
|
52
|
+
checkIfSameSettings(databaseId, firestoreSettings) {
|
|
53
|
+
// If we start passing more settings to Firestore constructor,
|
|
54
|
+
// replace this with deep equality check.
|
|
55
|
+
const existingSettings = this.firestoreSettings.get(databaseId);
|
|
56
|
+
if (!existingSettings) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return (existingSettings.preferRest === firestoreSettings.preferRest);
|
|
60
|
+
}
|
|
38
61
|
/**
|
|
39
62
|
* Returns the app associated with this Storage instance.
|
|
40
63
|
*
|
|
@@ -45,7 +68,7 @@ class FirestoreService {
|
|
|
45
68
|
}
|
|
46
69
|
}
|
|
47
70
|
exports.FirestoreService = FirestoreService;
|
|
48
|
-
function getFirestoreOptions(app) {
|
|
71
|
+
function getFirestoreOptions(app, firestoreSettings) {
|
|
49
72
|
if (!validator.isNonNullObject(app) || !('options' in app)) {
|
|
50
73
|
throw new error_1.FirebaseFirestoreError({
|
|
51
74
|
code: 'invalid-argument',
|
|
@@ -56,6 +79,7 @@ function getFirestoreOptions(app) {
|
|
|
56
79
|
const credential = app.options.credential;
|
|
57
80
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
58
81
|
const { version: firebaseVersion } = require('../../package.json');
|
|
82
|
+
const preferRest = firestoreSettings?.preferRest;
|
|
59
83
|
if (credential instanceof credential_internal_1.ServiceAccountCredential) {
|
|
60
84
|
return {
|
|
61
85
|
credentials: {
|
|
@@ -66,13 +90,16 @@ function getFirestoreOptions(app) {
|
|
|
66
90
|
// guaranteed to be available.
|
|
67
91
|
projectId: projectId,
|
|
68
92
|
firebaseVersion,
|
|
93
|
+
preferRest,
|
|
69
94
|
};
|
|
70
95
|
}
|
|
71
96
|
else if ((0, credential_internal_1.isApplicationDefault)(app.options.credential)) {
|
|
72
97
|
// Try to use the Google application default credentials.
|
|
73
98
|
// If an explicit project ID is not available, let Firestore client discover one from the
|
|
74
99
|
// environment. This prevents the users from having to set GOOGLE_CLOUD_PROJECT in GCP runtimes.
|
|
75
|
-
return validator.isNonEmptyString(projectId)
|
|
100
|
+
return validator.isNonEmptyString(projectId)
|
|
101
|
+
? { projectId, firebaseVersion, preferRest }
|
|
102
|
+
: { firebaseVersion, preferRest };
|
|
76
103
|
}
|
|
77
104
|
throw new error_1.FirebaseFirestoreError({
|
|
78
105
|
code: 'invalid-credential',
|
|
@@ -82,8 +109,8 @@ function getFirestoreOptions(app) {
|
|
|
82
109
|
});
|
|
83
110
|
}
|
|
84
111
|
exports.getFirestoreOptions = getFirestoreOptions;
|
|
85
|
-
function initFirestore(app, databaseId) {
|
|
86
|
-
const options = getFirestoreOptions(app);
|
|
112
|
+
function initFirestore(app, databaseId, firestoreSettings) {
|
|
113
|
+
const options = getFirestoreOptions(app, firestoreSettings);
|
|
87
114
|
options.databaseId = databaseId;
|
|
88
115
|
let firestoreDatabase;
|
|
89
116
|
try {
|