firebase-admin 11.9.0 → 11.10.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 +13 -13
- 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 +28 -4
- package/lib/auth/user-record.js +58 -6
- 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/storage/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 +1 -1
- package/lib/extensions/extensions-api-client-internal.js +1 -1
- package/lib/extensions/extensions-api.d.ts +1 -1
- package/lib/extensions/extensions-api.js +1 -1
- package/lib/extensions/extensions.d.ts +1 -1
- package/lib/extensions/extensions.js +1 -1
- package/lib/extensions/index.d.ts +1 -1
- package/lib/extensions/index.js +1 -1
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +1 -1
- package/lib/firestore/firestore-internal.d.ts +1 -1
- package/lib/firestore/firestore-internal.js +1 -1
- package/lib/firestore/firestore-namespace.d.ts +1 -1
- package/lib/firestore/firestore-namespace.js +1 -1
- package/lib/firestore/index.d.ts +67 -23
- package/lib/firestore/index.js +1 -1
- package/lib/functions/functions-api-client-internal.d.ts +3 -2
- package/lib/functions/functions-api-client-internal.js +105 -27
- package/lib/functions/functions-api.d.ts +33 -1
- package/lib/functions/functions-api.js +1 -1
- package/lib/functions/functions.d.ts +7 -1
- package/lib/functions/functions.js +9 -1
- package/lib/functions/index.d.ts +2 -2
- 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 +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +1 -1
- package/lib/machine-learning/machine-learning-namespace.d.ts +1 -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 +1 -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 +1 -1
- 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 +14 -1
- package/lib/storage/index.js +29 -7
- 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/storage/utils.d.ts +20 -0
- package/lib/storage/utils.js +21 -0
- package/lib/utils/api-request.d.ts +1 -1
- package/lib/utils/api-request.js +1 -9
- 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 +9 -1
- package/lib/utils/validator.js +17 -2
- package/package.json +3 -3
package/lib/auth/user-record.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.UserRecord = exports.UserInfo = exports.UserMetadata = exports.MultiFactorSettings = exports.PhoneMultiFactorInfo = exports.MultiFactorInfo = void 0;
|
|
20
|
+
exports.UserRecord = exports.UserInfo = exports.UserMetadata = exports.MultiFactorSettings = exports.TotpMultiFactorInfo = exports.TotpInfo = exports.PhoneMultiFactorInfo = exports.MultiFactorInfo = void 0;
|
|
21
21
|
const deep_copy_1 = require("../utils/deep-copy");
|
|
22
22
|
const validator_1 = require("../utils/validator");
|
|
23
23
|
const utils = require("../utils");
|
|
@@ -47,6 +47,7 @@ function parseDate(time) {
|
|
|
47
47
|
var MultiFactorId;
|
|
48
48
|
(function (MultiFactorId) {
|
|
49
49
|
MultiFactorId["Phone"] = "phone";
|
|
50
|
+
MultiFactorId["Totp"] = "totp";
|
|
50
51
|
})(MultiFactorId || (MultiFactorId = {}));
|
|
51
52
|
/**
|
|
52
53
|
* Interface representing the common properties of a user-enrolled second factor.
|
|
@@ -61,9 +62,17 @@ class MultiFactorInfo {
|
|
|
61
62
|
*/
|
|
62
63
|
static initMultiFactorInfo(response) {
|
|
63
64
|
let multiFactorInfo = null;
|
|
64
|
-
//
|
|
65
|
+
// PhoneMultiFactorInfo, TotpMultiFactorInfo currently available.
|
|
65
66
|
try {
|
|
66
|
-
|
|
67
|
+
if (response.phoneInfo !== undefined) {
|
|
68
|
+
multiFactorInfo = new PhoneMultiFactorInfo(response);
|
|
69
|
+
}
|
|
70
|
+
else if (response.totpInfo !== undefined) {
|
|
71
|
+
multiFactorInfo = new TotpMultiFactorInfo(response);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// Ignore the other SDK unsupported MFA factors to prevent blocking developers using the current SDK.
|
|
75
|
+
}
|
|
67
76
|
}
|
|
68
77
|
catch (e) {
|
|
69
78
|
// Ignore error.
|
|
@@ -156,12 +165,55 @@ class PhoneMultiFactorInfo extends MultiFactorInfo {
|
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
167
|
exports.PhoneMultiFactorInfo = PhoneMultiFactorInfo;
|
|
168
|
+
/**
|
|
169
|
+
* `TotpInfo` struct associated with a second factor
|
|
170
|
+
*/
|
|
171
|
+
class TotpInfo {
|
|
172
|
+
}
|
|
173
|
+
exports.TotpInfo = TotpInfo;
|
|
174
|
+
/**
|
|
175
|
+
* Interface representing a TOTP specific user-enrolled second factor.
|
|
176
|
+
*/
|
|
177
|
+
class TotpMultiFactorInfo extends MultiFactorInfo {
|
|
178
|
+
/**
|
|
179
|
+
* Initializes the `TotpMultiFactorInfo` object using the server side response.
|
|
180
|
+
*
|
|
181
|
+
* @param response - The server side response.
|
|
182
|
+
* @constructor
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
185
|
+
constructor(response) {
|
|
186
|
+
super(response);
|
|
187
|
+
utils.addReadonlyGetter(this, 'totpInfo', response.totpInfo);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* {@inheritdoc MultiFactorInfo.toJSON}
|
|
191
|
+
*/
|
|
192
|
+
toJSON() {
|
|
193
|
+
return Object.assign(super.toJSON(), {
|
|
194
|
+
totpInfo: this.totpInfo,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Returns the factor ID based on the response provided.
|
|
199
|
+
*
|
|
200
|
+
* @param response - The server side response.
|
|
201
|
+
* @returns The multi-factor ID associated with the provided response. If the response is
|
|
202
|
+
* not associated with any known multi-factor ID, `null` is returned.
|
|
203
|
+
*
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
getFactorId(response) {
|
|
207
|
+
return (response && response.totpInfo) ? MultiFactorId.Totp : null;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
exports.TotpMultiFactorInfo = TotpMultiFactorInfo;
|
|
159
211
|
/**
|
|
160
212
|
* The multi-factor related user settings.
|
|
161
213
|
*/
|
|
162
214
|
class MultiFactorSettings {
|
|
163
215
|
/**
|
|
164
|
-
* Initializes the MultiFactor object using the server side or JWT format response.
|
|
216
|
+
* Initializes the `MultiFactor` object using the server side or JWT format response.
|
|
165
217
|
*
|
|
166
218
|
* @param response - The server side response.
|
|
167
219
|
* @constructor
|
|
@@ -200,7 +252,7 @@ exports.MultiFactorSettings = MultiFactorSettings;
|
|
|
200
252
|
*/
|
|
201
253
|
class UserMetadata {
|
|
202
254
|
/**
|
|
203
|
-
* @param response - The server side response returned from the getAccountInfo
|
|
255
|
+
* @param response - The server side response returned from the `getAccountInfo`
|
|
204
256
|
* endpoint.
|
|
205
257
|
* @constructor
|
|
206
258
|
* @internal
|
package/lib/credential/index.js
CHANGED
package/lib/database/database.js
CHANGED
package/lib/database/index.d.ts
CHANGED
package/lib/database/index.js
CHANGED
package/lib/default-namespace.js
CHANGED
package/lib/esm/storage/index.js
CHANGED
package/lib/eventarc/eventarc.js
CHANGED
package/lib/eventarc/index.d.ts
CHANGED
package/lib/eventarc/index.js
CHANGED
package/lib/extensions/index.js
CHANGED
package/lib/firestore/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2020 Google Inc.
|
|
4
4
|
*
|
|
@@ -25,48 +25,73 @@ import { FirestoreSettings } from './firestore-internal';
|
|
|
25
25
|
export { AddPrefixToKeys, BulkWriter, BulkWriterOptions, BundleBuilder, ChildUpdateFields, CollectionGroup, CollectionReference, DocumentChange, DocumentChangeType, DocumentData, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Filter, Firestore, FirestoreDataConverter, GeoPoint, GrpcStatus, NestedUpdateFields, OrderByDirection, PartialWithFieldValue, Precondition, Primitive, Query, QueryDocumentSnapshot, QueryPartition, QuerySnapshot, ReadOptions, ReadOnlyTransactionOptions, ReadWriteTransactionOptions, Settings, SetOptions, Timestamp, Transaction, UpdateData, UnionToIntersection, WhereFilterOp, WithFieldValue, WriteBatch, WriteResult, v1, setLogFunction, } from '@google-cloud/firestore';
|
|
26
26
|
export { FirestoreSettings };
|
|
27
27
|
/**
|
|
28
|
-
* Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
28
|
+
* Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
29
29
|
* service for the default app.
|
|
30
30
|
*
|
|
31
|
-
* `getFirestore()` can be called with no arguments to access the default
|
|
32
|
-
* app's `Firestore` service or as `getFirestore(app)` to access the
|
|
33
|
-
* `Firestore` service associated with a specific app.
|
|
34
|
-
*
|
|
35
31
|
* @example
|
|
36
32
|
* ```javascript
|
|
37
|
-
* // Get the Firestore service for the default app
|
|
33
|
+
* // Get the default Firestore service for the default app
|
|
38
34
|
* const defaultFirestore = getFirestore();
|
|
39
35
|
* ```
|
|
40
36
|
|
|
41
37
|
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
42
|
-
*
|
|
43
|
-
* provided app.
|
|
38
|
+
* service for the default app.
|
|
44
39
|
*/
|
|
45
40
|
export declare function getFirestore(): Firestore;
|
|
46
41
|
/**
|
|
47
|
-
* Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
42
|
+
* Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
48
43
|
* service for the given app.
|
|
49
44
|
*
|
|
50
|
-
* `getFirestore()` can be called with no arguments to access the default
|
|
51
|
-
* app's `Firestore` service or as `getFirestore(app)` to access the
|
|
52
|
-
* `Firestore` service associated with a specific app.
|
|
53
|
-
*
|
|
54
45
|
* @example
|
|
55
46
|
* ```javascript
|
|
56
|
-
* // Get the Firestore service for a specific app
|
|
47
|
+
* // Get the default Firestore service for a specific app
|
|
57
48
|
* const otherFirestore = getFirestore(app);
|
|
58
49
|
* ```
|
|
59
50
|
*
|
|
60
|
-
* @param
|
|
61
|
-
* return. If not provided, the default `Firestore` service will be returned.
|
|
51
|
+
* @param app - which `Firestore` service to return.
|
|
62
52
|
*
|
|
63
53
|
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
64
|
-
*
|
|
65
|
-
* provided app.
|
|
54
|
+
* service associated with the provided app.
|
|
66
55
|
*/
|
|
67
56
|
export declare function getFirestore(app: App): Firestore;
|
|
68
57
|
/**
|
|
69
|
-
* Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
58
|
+
* Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
59
|
+
* service for the default app.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```javascript
|
|
63
|
+
* // Get the Firestore service for a named database and default app
|
|
64
|
+
* const otherFirestore = getFirestore('otherDb');
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param databaseId - name of database to return.
|
|
68
|
+
*
|
|
69
|
+
* @returns The named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
70
|
+
* service for the default app.
|
|
71
|
+
* @beta
|
|
72
|
+
*/
|
|
73
|
+
export declare function getFirestore(databaseId: string): Firestore;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
76
|
+
* service for the given app.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```javascript
|
|
80
|
+
* // Get the Firestore service for a named database and specific app.
|
|
81
|
+
* const otherFirestore = getFirestore('otherDb');
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @param app - which `Firestore` service to return.
|
|
85
|
+
*
|
|
86
|
+
* @param databaseId - name of database to return.
|
|
87
|
+
*
|
|
88
|
+
* @returns The named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
89
|
+
* service associated with the provided app.
|
|
90
|
+
* @beta
|
|
91
|
+
*/
|
|
92
|
+
export declare function getFirestore(app: App, databaseId: string): Firestore;
|
|
93
|
+
/**
|
|
94
|
+
* Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
70
95
|
* service for the given app, passing extra parameters to its constructor.
|
|
71
96
|
*
|
|
72
97
|
* @example
|
|
@@ -75,11 +100,30 @@ export declare function getFirestore(app: App): Firestore;
|
|
|
75
100
|
* const otherFirestore = initializeFirestore(app, {preferRest: true});
|
|
76
101
|
* ```
|
|
77
102
|
*
|
|
78
|
-
* @param
|
|
79
|
-
* return. If not provided, the default `Firestore` service will be returned.
|
|
103
|
+
* @param app - which `Firestore` service to return.
|
|
80
104
|
*
|
|
81
105
|
* @param settings - Settings object to be passed to the constructor.
|
|
82
106
|
*
|
|
83
|
-
* @returns The `Firestore` service associated with the provided app and settings.
|
|
107
|
+
* @returns The default `Firestore` service associated with the provided app and settings.
|
|
84
108
|
*/
|
|
85
109
|
export declare function initializeFirestore(app: App, settings?: FirestoreSettings): Firestore;
|
|
110
|
+
/**
|
|
111
|
+
* Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
|
112
|
+
* service for the given app, passing extra parameters to its constructor.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```javascript
|
|
116
|
+
* // Get the Firestore service for a specific app, require HTTP/1.1 REST transport
|
|
117
|
+
* const otherFirestore = initializeFirestore(app, {preferRest: true}, 'otherDb');
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @param app - which `Firestore` service to return.
|
|
121
|
+
*
|
|
122
|
+
* @param settings - Settings object to be passed to the constructor.
|
|
123
|
+
*
|
|
124
|
+
* @param databaseId - name of database to return.
|
|
125
|
+
*
|
|
126
|
+
* @returns The named `Firestore` service associated with the provided app and settings.
|
|
127
|
+
* @beta
|
|
128
|
+
*/
|
|
129
|
+
export declare function initializeFirestore(app: App, settings: FirestoreSettings, databaseId: string): Firestore;
|
package/lib/firestore/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2021 Google Inc.
|
|
@@ -21,6 +21,7 @@ import { PrefixedFirebaseError } from '../utils/error';
|
|
|
21
21
|
* containing the relevant fields for enqueueing tasks that tirgger Cloud Functions.
|
|
22
22
|
*/
|
|
23
23
|
export interface Task {
|
|
24
|
+
name?: string;
|
|
24
25
|
scheduleTime?: string;
|
|
25
26
|
dispatchDeadline?: string;
|
|
26
27
|
httpRequest: {
|
|
@@ -37,7 +38,7 @@ export interface Task {
|
|
|
37
38
|
export declare const FUNCTIONS_ERROR_CODE_MAPPING: {
|
|
38
39
|
[key: string]: FunctionsErrorCode;
|
|
39
40
|
};
|
|
40
|
-
export type FunctionsErrorCode = 'aborted' | 'invalid-argument' | 'invalid-credential' | 'internal-error' | 'failed-precondition' | 'permission-denied' | 'unauthenticated' | 'not-found' | 'unknown-error';
|
|
41
|
+
export type FunctionsErrorCode = 'aborted' | 'invalid-argument' | 'invalid-credential' | 'internal-error' | 'failed-precondition' | 'permission-denied' | 'unauthenticated' | 'not-found' | 'unknown-error' | 'task-already-exists';
|
|
41
42
|
/**
|
|
42
43
|
* Firebase Functions error code structure. This extends PrefixedFirebaseError.
|
|
43
44
|
*
|