firebase-admin 13.2.0 → 13.3.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/data-connect/data-connect-api-client-internal.d.ts +1 -1
- package/lib/data-connect/data-connect-api-client-internal.js +1 -1
- package/lib/data-connect/data-connect-api.d.ts +1 -1
- package/lib/data-connect/data-connect-api.js +1 -1
- package/lib/data-connect/data-connect.d.ts +1 -1
- package/lib/data-connect/data-connect.js +1 -1
- package/lib/data-connect/index.d.ts +1 -1
- package/lib/data-connect/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/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 +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 +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/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 +9 -2
- 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 +5 -1
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +2 -1
- package/lib/messaging/messaging.js +52 -32
- 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/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +1 -1
- 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 +5 -1
- package/lib/utils/api-request.js +24 -4
- 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 +7 -1
- package/lib/utils/error.js +31 -2
- 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 +1 -1
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
package/lib/functions/index.d.ts
CHANGED
package/lib/functions/index.js
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/instance-id/index.js
CHANGED
package/lib/messaging/index.d.ts
CHANGED
package/lib/messaging/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.3.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2021 Google Inc.
|
|
@@ -514,7 +514,8 @@ export interface AndroidNotification {
|
|
|
514
514
|
defaultLightSettings?: boolean;
|
|
515
515
|
/**
|
|
516
516
|
* Sets the visibility of the notification. Must be either `private`, `public`,
|
|
517
|
-
* or `secret`. If unspecified,
|
|
517
|
+
* or `secret`. If unspecified, it remains undefined in the Admin SDK, and
|
|
518
|
+
* defers to the FCM backend's default mapping.
|
|
518
519
|
*/
|
|
519
520
|
visibility?: ('private' | 'public' | 'secret');
|
|
520
521
|
/**
|
|
@@ -528,6 +529,12 @@ export interface AndroidNotification {
|
|
|
528
529
|
* displayed on the long-press menu each time a new notification arrives.
|
|
529
530
|
*/
|
|
530
531
|
notificationCount?: number;
|
|
532
|
+
/**
|
|
533
|
+
* Sets if this notification should attempt to be proxied. Must be either
|
|
534
|
+
* `allow`, `deny` or `if_priority_lowered`. If unspecified, it remains
|
|
535
|
+
* undefined in the Admin SDK, and defers to the FCM backend's default mapping.
|
|
536
|
+
*/
|
|
537
|
+
proxy?: ('allow' | 'deny' | 'if_priority_lowered');
|
|
531
538
|
}
|
|
532
539
|
/**
|
|
533
540
|
* Represents settings to control notification LED that can be included in
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.3.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2020 Google Inc.
|
|
@@ -396,6 +396,10 @@ function validateAndroidNotification(notification) {
|
|
|
396
396
|
const priority = 'PRIORITY_' + notification.priority.toUpperCase();
|
|
397
397
|
notification.priority = priority;
|
|
398
398
|
}
|
|
399
|
+
if (typeof notification.proxy !== 'undefined') {
|
|
400
|
+
const proxy = notification.proxy.toUpperCase();
|
|
401
|
+
notification.proxy = proxy;
|
|
402
|
+
}
|
|
399
403
|
if (typeof notification.visibility !== 'undefined') {
|
|
400
404
|
const visibility = notification.visibility.toUpperCase();
|
|
401
405
|
notification.visibility = visibility;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.3.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -79,6 +79,7 @@ export declare class Messaging {
|
|
|
79
79
|
* send operation.
|
|
80
80
|
*/
|
|
81
81
|
sendEach(messages: Message[], dryRun?: boolean): Promise<BatchResponse>;
|
|
82
|
+
private parseSendResponses;
|
|
82
83
|
/**
|
|
83
84
|
* Sends the given multicast message to all the FCM registration tokens
|
|
84
85
|
* specified in it.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.3.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -173,41 +173,61 @@ class Messaging {
|
|
|
173
173
|
const http2SessionHandler = this.useLegacyTransport ? undefined : new api_request_1.Http2SessionHandler(`https://${FCM_SEND_HOST}`);
|
|
174
174
|
return this.getUrlPath()
|
|
175
175
|
.then((urlPath) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
176
|
+
if (http2SessionHandler) {
|
|
177
|
+
let sendResponsePromise;
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
// Start session listeners
|
|
180
|
+
http2SessionHandler.invoke().catch((error) => {
|
|
181
|
+
const pendingBatchResponse = sendResponsePromise ? sendResponsePromise.then(this.parseSendResponses) : undefined;
|
|
182
|
+
reject(new error_1.FirebaseMessagingSessionError(error, undefined, pendingBatchResponse));
|
|
183
|
+
});
|
|
184
|
+
// Start making requests
|
|
185
|
+
const requests = copy.map(async (message) => {
|
|
186
|
+
(0, messaging_internal_1.validateMessage)(message);
|
|
187
|
+
const request = { message };
|
|
188
|
+
if (dryRun) {
|
|
189
|
+
request.validate_only = true;
|
|
190
|
+
}
|
|
191
|
+
return this.messagingRequestHandler.invokeHttp2RequestHandlerForSendResponse(FCM_SEND_HOST, urlPath, request, http2SessionHandler);
|
|
192
|
+
});
|
|
193
|
+
// Resolve once all requests have completed
|
|
194
|
+
sendResponsePromise = Promise.allSettled(requests);
|
|
195
|
+
sendResponsePromise.then(resolve);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
const requests = copy.map(async (message) => {
|
|
200
|
+
(0, messaging_internal_1.validateMessage)(message);
|
|
201
|
+
const request = { message };
|
|
202
|
+
if (dryRun) {
|
|
203
|
+
request.validate_only = true;
|
|
204
|
+
}
|
|
205
|
+
return this.messagingRequestHandler.invokeHttpRequestHandlerForSendResponse(FCM_SEND_HOST, urlPath, request);
|
|
206
|
+
});
|
|
207
|
+
return Promise.allSettled(requests);
|
|
208
|
+
}
|
|
205
209
|
})
|
|
210
|
+
.then(this.parseSendResponses)
|
|
206
211
|
.finally(() => {
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
http2SessionHandler?.close();
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
parseSendResponses(results) {
|
|
216
|
+
const responses = [];
|
|
217
|
+
results.forEach(result => {
|
|
218
|
+
if (result.status === 'fulfilled') {
|
|
219
|
+
responses.push(result.value);
|
|
220
|
+
}
|
|
221
|
+
else { // rejected
|
|
222
|
+
responses.push({ success: false, error: result.reason });
|
|
209
223
|
}
|
|
210
224
|
});
|
|
225
|
+
const successCount = responses.filter((resp) => resp.success).length;
|
|
226
|
+
return {
|
|
227
|
+
responses,
|
|
228
|
+
successCount,
|
|
229
|
+
failureCount: responses.length - successCount,
|
|
230
|
+
};
|
|
211
231
|
}
|
|
212
232
|
/**
|
|
213
233
|
* Sends the given multicast message to all the FCM registration tokens
|