firebase-admin 12.2.0 → 12.3.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/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 +4 -4
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +3 -1
- package/lib/app/firebase-app.js +10 -4
- 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 +2 -2
- 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 +2 -2
- 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/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 +1 -1
- package/lib/firestore/index.js +1 -1
- package/lib/functions/functions-api-client-internal.d.ts +1 -1
- package/lib/functions/functions-api-client-internal.js +3 -3
- 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 +2 -2
- 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 +4 -4
- 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 +15 -4
- package/lib/messaging/messaging-api-request-internal.js +39 -10
- 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 +6 -6
- package/lib/messaging/messaging-errors-internal.js +4 -4
- 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 +16 -1
- package/lib/messaging/messaging.js +37 -9
- 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 +3 -3
- 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/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +20 -14
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +1 -1
- package/lib/remote-config/internal/value-impl.d.ts +1 -1
- package/lib/remote-config/internal/value-impl.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/storage/utils.d.ts +1 -1
- package/lib/storage/utils.js +1 -1
- package/lib/utils/api-request.d.ts +134 -42
- package/lib/utils/api-request.js +430 -186
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +2 -2
- 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 +3 -3
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +5 -6
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
package/lib/firestore/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v12.
|
|
1
|
+
/*! firebase-admin v12.3.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -84,7 +84,7 @@ class FunctionsApiClient {
|
|
|
84
84
|
await this.httpClient.send(request);
|
|
85
85
|
}
|
|
86
86
|
catch (err) {
|
|
87
|
-
if (err instanceof api_request_1.
|
|
87
|
+
if (err instanceof api_request_1.RequestResponseError) {
|
|
88
88
|
if (err.response.status === 404) {
|
|
89
89
|
// if no task with the provided ID exists, then ignore the delete.
|
|
90
90
|
return;
|
|
@@ -138,7 +138,7 @@ class FunctionsApiClient {
|
|
|
138
138
|
await this.httpClient.send(request);
|
|
139
139
|
}
|
|
140
140
|
catch (err) {
|
|
141
|
-
if (err instanceof api_request_1.
|
|
141
|
+
if (err instanceof api_request_1.RequestResponseError) {
|
|
142
142
|
if (err.response.status === 409) {
|
|
143
143
|
throw new FirebaseFunctionsError('task-already-exists', `A task with ID ${opts?.id} already exists`);
|
|
144
144
|
}
|
package/lib/functions/index.d.ts
CHANGED
package/lib/functions/index.js
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v12.
|
|
1
|
+
/*! firebase-admin v12.3.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -80,7 +80,7 @@ class FirebaseInstallationsRequestHandler {
|
|
|
80
80
|
// return nothing on success
|
|
81
81
|
})
|
|
82
82
|
.catch((err) => {
|
|
83
|
-
if (err instanceof api_request_1.
|
|
83
|
+
if (err instanceof api_request_1.RequestResponseError) {
|
|
84
84
|
const response = err.response;
|
|
85
85
|
const errorMessage = (response.isJson() && 'error' in response.data) ?
|
|
86
86
|
response.data.error : response.text;
|
package/lib/instance-id/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v12.
|
|
1
|
+
/*! firebase-admin v12.3.1 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2019 Google Inc.
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { HttpClient,
|
|
17
|
+
import { HttpClient, RequestResponse } from '../utils/api-request';
|
|
18
18
|
/**
|
|
19
19
|
* Represents a request that can be sent as part of an HTTP batch request.
|
|
20
20
|
*/
|
|
@@ -45,11 +45,11 @@ export declare class BatchRequestClient {
|
|
|
45
45
|
constructor(httpClient: HttpClient, batchUrl: string, commonHeaders?: object | undefined);
|
|
46
46
|
/**
|
|
47
47
|
* Sends the given array of sub requests as a single batch, and parses the results into an array
|
|
48
|
-
* of
|
|
48
|
+
* of `RequestResponse` objects.
|
|
49
49
|
*
|
|
50
50
|
* @param requests - An array of sub requests to send.
|
|
51
51
|
* @returns A promise that resolves when the send operation is complete.
|
|
52
52
|
*/
|
|
53
|
-
send(requests: SubRequest[]): Promise<
|
|
53
|
+
send(requests: SubRequest[]): Promise<RequestResponse[]>;
|
|
54
54
|
private getMultipartPayload;
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v12.
|
|
1
|
+
/*! firebase-admin v12.3.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2019 Google Inc.
|
|
@@ -42,7 +42,7 @@ class BatchRequestClient {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Sends the given array of sub requests as a single batch, and parses the results into an array
|
|
45
|
-
* of
|
|
45
|
+
* of `RequestResponse` objects.
|
|
46
46
|
*
|
|
47
47
|
* @param requests - An array of sub requests to send.
|
|
48
48
|
* @returns A promise that resolves when the send operation is complete.
|
package/lib/messaging/index.d.ts
CHANGED
package/lib/messaging/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v12.
|
|
1
|
+
/*! firebase-admin v12.3.1 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { App } from '../app';
|
|
19
|
+
import { Http2SessionHandler } from '../utils/api-request';
|
|
19
20
|
import { SubRequest } from './batch-request-internal';
|
|
20
21
|
import { SendResponse, BatchResponse } from './messaging-api';
|
|
21
22
|
/**
|
|
@@ -23,6 +24,7 @@ import { SendResponse, BatchResponse } from './messaging-api';
|
|
|
23
24
|
*/
|
|
24
25
|
export declare class FirebaseMessagingRequestHandler {
|
|
25
26
|
private readonly httpClient;
|
|
27
|
+
private readonly http2Client;
|
|
26
28
|
private readonly batchClient;
|
|
27
29
|
/**
|
|
28
30
|
* @param app - The app used to fetch access tokens to sign API requests.
|
|
@@ -39,17 +41,26 @@ export declare class FirebaseMessagingRequestHandler {
|
|
|
39
41
|
*/
|
|
40
42
|
invokeRequestHandler(host: string, path: string, requestData: object): Promise<object>;
|
|
41
43
|
/**
|
|
42
|
-
* Invokes the request handler with the provided request data.
|
|
44
|
+
* Invokes the HTTP/1.1 request handler with the provided request data.
|
|
45
|
+
*
|
|
46
|
+
* @param host - The host to which to send the request.
|
|
47
|
+
* @param path - The path to which to send the request.
|
|
48
|
+
* @param requestData - The request data.
|
|
49
|
+
* @returns A promise that resolves with the {@link SendResponse}.
|
|
50
|
+
*/
|
|
51
|
+
invokeHttpRequestHandlerForSendResponse(host: string, path: string, requestData: object): Promise<SendResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Invokes the HTTP/2 request handler with the provided request data.
|
|
43
54
|
*
|
|
44
55
|
* @param host - The host to which to send the request.
|
|
45
56
|
* @param path - The path to which to send the request.
|
|
46
57
|
* @param requestData - The request data.
|
|
47
58
|
* @returns A promise that resolves with the {@link SendResponse}.
|
|
48
59
|
*/
|
|
49
|
-
|
|
60
|
+
invokeHttp2RequestHandlerForSendResponse(host: string, path: string, requestData: object, http2SessionHandler: Http2SessionHandler): Promise<SendResponse>;
|
|
50
61
|
/**
|
|
51
62
|
* Sends the given array of sub requests as a single batch to FCM, and parses the result into
|
|
52
|
-
* a BatchResponse object.
|
|
63
|
+
* a `BatchResponse` object.
|
|
53
64
|
*
|
|
54
65
|
* @param requests - An array of sub requests to send.
|
|
55
66
|
* @returns A promise that resolves when the send operation is complete.
|