firebase-admin 13.10.0 → 14.0.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/README.md +1 -2
- package/lib/app/core.d.ts +2 -38
- 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 +45 -14
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/error.d.ts +47 -0
- package/lib/app/error.js +57 -0
- package/lib/app/firebase-app.d.ts +1 -1
- package/lib/app/firebase-app.js +28 -12
- package/lib/app/index.d.ts +4 -3
- package/lib/app/index.js +6 -4
- package/lib/app/lifecycle.d.ts +2 -2
- package/lib/app/lifecycle.js +46 -21
- package/lib/app-check/app-check-api-client-internal.d.ts +2 -16
- package/lib/app-check/app-check-api-client-internal.js +57 -48
- 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.d.ts +1 -1
- package/lib/app-check/app-check.js +6 -2
- package/lib/app-check/error.d.ts +47 -0
- package/lib/app-check/error.js +65 -0
- package/lib/app-check/index.d.ts +2 -1
- package/lib/app-check/index.js +5 -2
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +43 -13
- package/lib/app-check/token-verifier.d.ts +1 -1
- package/lib/app-check/token-verifier.js +39 -11
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +16 -16
- package/lib/auth/auth-api-request.d.ts +6 -4
- package/lib/auth/auth-api-request.js +277 -166
- package/lib/auth/auth-config.d.ts +31 -2
- package/lib/auth/auth-config.js +103 -103
- package/lib/auth/auth.d.ts +1 -1
- package/lib/auth/auth.js +1 -1
- package/lib/auth/base-auth.d.ts +2 -1
- package/lib/auth/base-auth.js +29 -27
- package/lib/auth/error.d.ts +137 -0
- package/lib/auth/error.js +690 -0
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +1 -1
- package/lib/auth/index.d.ts +2 -2
- package/lib/auth/index.js +4 -4
- 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 +4 -4
- package/lib/auth/tenant-manager.d.ts +2 -1
- package/lib/auth/tenant-manager.js +13 -10
- package/lib/auth/tenant.d.ts +1 -1
- package/lib/auth/tenant.js +7 -7
- package/lib/auth/token-generator.d.ts +1 -1
- package/lib/auth/token-generator.js +13 -13
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +22 -22
- package/lib/auth/user-import-builder.d.ts +1 -1
- package/lib/auth/user-import-builder.js +22 -22
- package/lib/auth/user-record.d.ts +1 -1
- package/lib/auth/user-record.js +6 -6
- 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 -16
- package/lib/data-connect/data-connect-api-client-internal.js +122 -65
- 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/error.d.ts +47 -0
- package/lib/data-connect/error.js +66 -0
- package/lib/data-connect/index.d.ts +2 -1
- package/lib/data-connect/index.js +5 -2
- package/lib/data-connect/validate-admin-args.d.ts +1 -1
- package/lib/data-connect/validate-admin-args.js +6 -3
- package/lib/database/database.d.ts +1 -1
- package/lib/database/database.js +11 -6
- package/lib/database/error.d.ts +39 -0
- package/lib/database/error.js +49 -0
- package/lib/database/index.d.ts +2 -2
- package/lib/database/index.js +4 -3
- package/lib/esm/app/index.js +2 -1
- package/lib/esm/app-check/index.js +2 -0
- package/lib/esm/auth/index.js +1 -1
- package/lib/esm/data-connect/index.js +2 -0
- package/lib/esm/database/index.js +1 -0
- package/lib/esm/eventarc/index.js +2 -0
- package/lib/esm/extensions/index.js +2 -0
- package/lib/esm/firebase-admin/index.js +13 -0
- package/lib/esm/firestore/index.js +1 -0
- package/lib/esm/functions/index.js +2 -0
- package/lib/esm/installations/index.js +1 -1
- package/lib/esm/machine-learning/index.js +2 -0
- package/lib/esm/messaging/index.js +1 -1
- package/lib/esm/phone-number-verification/index.js +2 -0
- package/lib/esm/project-management/index.js +1 -0
- package/lib/esm/remote-config/index.js +2 -0
- package/lib/esm/security-rules/index.js +2 -0
- package/lib/esm/storage/index.js +2 -0
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/error.d.ts +38 -0
- package/lib/eventarc/error.js +47 -0
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +24 -9
- package/lib/eventarc/eventarc-utils.d.ts +1 -13
- package/lib/eventarc/eventarc-utils.js +34 -24
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +18 -6
- package/lib/eventarc/index.d.ts +2 -1
- package/lib/eventarc/index.js +5 -2
- package/lib/extensions/error.d.ts +41 -0
- package/lib/extensions/error.js +50 -0
- package/lib/extensions/extensions-api-client-internal.d.ts +1 -13
- package/lib/extensions/extensions-api-client-internal.js +40 -28
- 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 +18 -5
- package/lib/extensions/index.d.ts +2 -1
- package/lib/extensions/index.js +5 -2
- package/lib/firestore/error.d.ts +41 -0
- package/lib/firestore/error.js +51 -0
- package/lib/firestore/firestore-internal.d.ts +2 -1
- package/lib/firestore/firestore-internal.js +6 -6
- package/lib/firestore/index.d.ts +2 -2
- package/lib/firestore/index.js +7 -7
- package/lib/functions/error.d.ts +48 -0
- package/lib/functions/error.js +67 -0
- package/lib/functions/functions-api-client-internal.d.ts +1 -16
- package/lib/functions/functions-api-client-internal.js +111 -71
- 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 +14 -4
- package/lib/functions/index.d.ts +2 -1
- package/lib/functions/index.js +5 -2
- package/lib/index.d.ts +13 -8
- package/lib/index.js +19 -3
- package/lib/installations/error.d.ts +48 -0
- package/lib/installations/error.js +73 -0
- package/lib/installations/index.d.ts +2 -2
- package/lib/installations/index.js +4 -4
- package/lib/installations/installations-request-handler.d.ts +1 -1
- package/lib/installations/installations-request-handler.js +11 -5
- package/lib/installations/installations.d.ts +1 -1
- package/lib/installations/installations.js +3 -3
- package/lib/machine-learning/error.d.ts +53 -0
- package/lib/machine-learning/error.js +84 -0
- package/lib/machine-learning/index.d.ts +2 -1
- package/lib/machine-learning/index.js +5 -2
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +61 -24
- package/lib/machine-learning/machine-learning.d.ts +1 -1
- package/lib/machine-learning/machine-learning.js +21 -9
- package/lib/messaging/error.d.ts +63 -0
- package/lib/messaging/error.js +286 -0
- package/lib/messaging/index.d.ts +3 -3
- package/lib/messaging/index.js +4 -4
- 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 -280
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +2 -2
- package/lib/messaging/messaging-errors-internal.js +11 -8
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +48 -48
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +47 -50
- package/lib/phone-number-verification/error.d.ts +43 -0
- package/lib/phone-number-verification/error.js +48 -0
- package/lib/phone-number-verification/index.d.ts +2 -1
- package/lib/phone-number-verification/index.js +5 -2
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.d.ts +1 -18
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.js +2 -26
- package/lib/phone-number-verification/phone-number-verification-api.d.ts +2 -2
- package/lib/phone-number-verification/phone-number-verification-api.js +5 -4
- package/lib/phone-number-verification/phone-number-verification.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification.js +1 -1
- package/lib/phone-number-verification/token-verifier.d.ts +1 -1
- package/lib/phone-number-verification/token-verifier.js +68 -20
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +15 -6
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/error.d.ts +45 -0
- package/lib/project-management/error.js +55 -0
- package/lib/project-management/index.d.ts +2 -2
- package/lib/project-management/index.js +4 -3
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +6 -3
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +18 -6
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +13 -7
- package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +2 -2
- package/lib/remote-config/error.d.ts +49 -0
- package/lib/remote-config/error.js +70 -0
- package/lib/remote-config/index.d.ts +2 -1
- package/lib/remote-config/index.js +5 -2
- 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 +2 -13
- package/lib/remote-config/remote-config-api-client-internal.js +80 -52
- 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.d.ts +1 -1
- package/lib/remote-config/remote-config.js +92 -23
- package/lib/security-rules/error.d.ts +45 -0
- package/lib/security-rules/error.js +54 -0
- package/lib/security-rules/index.d.ts +2 -1
- package/lib/security-rules/index.js +5 -2
- package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-api-client-internal.js +50 -18
- package/lib/security-rules/security-rules.d.ts +1 -1
- package/lib/security-rules/security-rules.js +32 -11
- package/lib/storage/error.d.ts +41 -0
- package/lib/storage/error.js +50 -0
- package/lib/storage/index.d.ts +2 -1
- package/lib/storage/index.js +8 -5
- package/lib/storage/storage.d.ts +1 -1
- package/lib/storage/storage.js +12 -12
- package/lib/storage/utils.d.ts +1 -1
- package/lib/storage/utils.js +1 -1
- package/lib/utils/api-request.d.ts +12 -12
- package/lib/utils/api-request.js +97 -55
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +2 -7
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +1 -1
- package/lib/utils/error.d.ts +75 -570
- package/lib/utils/error.js +53 -1047
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +2 -2
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +1 -2
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +24 -29
- package/lib/app/firebase-namespace.d.ts +0 -163
- package/lib/app/firebase-namespace.js +0 -335
- package/lib/app-check/app-check-namespace.d.ts +0 -72
- package/lib/app-check/app-check-namespace.js +0 -18
- package/lib/auth/auth-namespace.d.ts +0 -257
- package/lib/auth/auth-namespace.js +0 -18
- package/lib/database/database-namespace.d.ts +0 -95
- package/lib/database/database-namespace.js +0 -23
- package/lib/default-namespace.d.ts +0 -24
- package/lib/default-namespace.js +0 -30
- package/lib/esm/instance-id/index.js +0 -6
- package/lib/firebase-namespace-api.d.ts +0 -91
- package/lib/firebase-namespace-api.js +0 -58
- package/lib/firestore/firestore-namespace.d.ts +0 -71
- package/lib/firestore/firestore-namespace.js +0 -52
- package/lib/installations/installations-namespace.d.ts +0 -55
- package/lib/installations/installations-namespace.js +0 -18
- package/lib/instance-id/index.d.ts +0 -62
- package/lib/instance-id/index.js +0 -74
- package/lib/instance-id/instance-id-namespace.d.ts +0 -38
- package/lib/instance-id/instance-id-namespace.js +0 -3
- package/lib/instance-id/instance-id.d.ts +0 -47
- package/lib/instance-id/instance-id.js +0 -77
- package/lib/machine-learning/machine-learning-namespace.d.ts +0 -81
- package/lib/machine-learning/machine-learning-namespace.js +0 -18
- package/lib/machine-learning/machine-learning-utils.d.ts +0 -22
- package/lib/machine-learning/machine-learning-utils.js +0 -47
- package/lib/messaging/messaging-namespace.d.ts +0 -161
- package/lib/messaging/messaging-namespace.js +0 -18
- package/lib/project-management/project-management-namespace.d.ts +0 -82
- package/lib/project-management/project-management-namespace.js +0 -18
- package/lib/remote-config/remote-config-namespace.d.ts +0 -141
- package/lib/remote-config/remote-config-namespace.js +0 -18
- package/lib/security-rules/security-rules-internal.d.ts +0 -21
- package/lib/security-rules/security-rules-internal.js +0 -26
- package/lib/security-rules/security-rules-namespace.d.ts +0 -69
- package/lib/security-rules/security-rules-namespace.js +0 -18
- package/lib/storage/storage-namespace.d.ts +0 -45
- package/lib/storage/storage-namespace.js +0 -18
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* Copyright 2026 Google LLC
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.FirebasePhoneNumberVerificationError = exports.FPNV_ERROR_CODE_MAPPING = exports.PhoneNumberVerificationErrorCode = void 0;
|
|
20
|
+
const error_1 = require("../utils/error");
|
|
21
|
+
/**
|
|
22
|
+
* The constant mapping for valid Phone Number Verification client error codes.
|
|
23
|
+
*/
|
|
24
|
+
exports.PhoneNumberVerificationErrorCode = {
|
|
25
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
26
|
+
INVALID_TOKEN: 'invalid-token',
|
|
27
|
+
EXPIRED_TOKEN: 'expired-token',
|
|
28
|
+
};
|
|
29
|
+
exports.FPNV_ERROR_CODE_MAPPING = exports.PhoneNumberVerificationErrorCode;
|
|
30
|
+
/**
|
|
31
|
+
* Firebase Phone Number Verification error code structure. This extends `FirebaseError`.
|
|
32
|
+
*
|
|
33
|
+
* @param info - The error code info.
|
|
34
|
+
* @param message - The error message. If provided, this will override the default message.
|
|
35
|
+
*/
|
|
36
|
+
class FirebasePhoneNumberVerificationError extends error_1.FirebaseError {
|
|
37
|
+
constructor(info, message) {
|
|
38
|
+
super({
|
|
39
|
+
code: `phone-number-verification/${info.code}`,
|
|
40
|
+
message: message || info.message,
|
|
41
|
+
httpResponse: info.httpResponse,
|
|
42
|
+
cause: info.cause,
|
|
43
|
+
});
|
|
44
|
+
/** @internal */
|
|
45
|
+
this.codePrefix = 'phone-number-verification';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.FirebasePhoneNumberVerificationError = FirebasePhoneNumberVerificationError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2025 Google LLC
|
|
@@ -48,3 +48,4 @@ export { PhoneNumberVerificationToken, } from './phone-number-verification-api';
|
|
|
48
48
|
*
|
|
49
49
|
*/
|
|
50
50
|
export declare function getPhoneNumberVerification(app?: App): PhoneNumberVerification;
|
|
51
|
+
export { FirebasePhoneNumberVerificationError, PhoneNumberVerificationErrorCode, } from './error';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.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.PhoneNumberVerification = void 0;
|
|
20
|
+
exports.PhoneNumberVerificationErrorCode = exports.FirebasePhoneNumberVerificationError = exports.PhoneNumberVerification = void 0;
|
|
21
21
|
exports.getPhoneNumberVerification = getPhoneNumberVerification;
|
|
22
22
|
/**
|
|
23
23
|
* Firebase Phone Number Verification.
|
|
@@ -58,3 +58,6 @@ function getPhoneNumberVerification(app) {
|
|
|
58
58
|
const firebaseApp = app;
|
|
59
59
|
return firebaseApp.getOrInitService('phone-number-verification', (app) => new phone_number_verification_1.PhoneNumberVerification(app));
|
|
60
60
|
}
|
|
61
|
+
var error_1 = require("./error");
|
|
62
|
+
Object.defineProperty(exports, "FirebasePhoneNumberVerificationError", { enumerable: true, get: function () { return error_1.FirebasePhoneNumberVerificationError; } });
|
|
63
|
+
Object.defineProperty(exports, "PhoneNumberVerificationErrorCode", { enumerable: true, get: function () { return error_1.PhoneNumberVerificationErrorCode; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2025 Google LLC
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { PrefixedFirebaseError } from '../utils/error';
|
|
19
18
|
export interface FirebasePhoneNumberTokenInfo {
|
|
20
19
|
/** Documentation URL. */
|
|
21
20
|
url: string;
|
|
@@ -30,19 +29,3 @@ export interface FirebasePhoneNumberTokenInfo {
|
|
|
30
29
|
}
|
|
31
30
|
export declare const JWKS_URL = "https://fpnv.googleapis.com/v1beta/jwks";
|
|
32
31
|
export declare const FPNV_TOKEN_INFO: FirebasePhoneNumberTokenInfo;
|
|
33
|
-
export declare const FPNV_ERROR_CODE_MAPPING: {
|
|
34
|
-
INVALID_ARGUMENT: "invalid-argument";
|
|
35
|
-
INVALID_TOKEN: "invalid-token";
|
|
36
|
-
EXPIRED_TOKEN: "expired-token";
|
|
37
|
-
};
|
|
38
|
-
export type PhoneNumberVerificationErrorCode = 'invalid-argument' | 'invalid-token' | 'expired-token';
|
|
39
|
-
/**
|
|
40
|
-
* Firebase Phone Number Verification error code structure. This extends `PrefixedFirebaseError`.
|
|
41
|
-
*
|
|
42
|
-
* @param code - The error code.
|
|
43
|
-
* @param message - The error message.
|
|
44
|
-
* @constructor
|
|
45
|
-
*/
|
|
46
|
-
export declare class FirebasePhoneNumberVerificationError extends PrefixedFirebaseError {
|
|
47
|
-
constructor(code: PhoneNumberVerificationErrorCode, message: string);
|
|
48
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
21
|
-
const error_1 = require("../utils/error");
|
|
20
|
+
exports.FPNV_TOKEN_INFO = exports.JWKS_URL = void 0;
|
|
22
21
|
exports.JWKS_URL = 'https://fpnv.googleapis.com/v1beta/jwks';
|
|
23
22
|
exports.FPNV_TOKEN_INFO = {
|
|
24
23
|
url: 'https://firebase.google.com/docs/phone-number-verification',
|
|
@@ -27,26 +26,3 @@ exports.FPNV_TOKEN_INFO = {
|
|
|
27
26
|
shortName: 'FPNV token',
|
|
28
27
|
typ: 'JWT',
|
|
29
28
|
};
|
|
30
|
-
exports.FPNV_ERROR_CODE_MAPPING = {
|
|
31
|
-
INVALID_ARGUMENT: 'invalid-argument',
|
|
32
|
-
INVALID_TOKEN: 'invalid-token',
|
|
33
|
-
EXPIRED_TOKEN: 'expired-token',
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Firebase Phone Number Verification error code structure. This extends `PrefixedFirebaseError`.
|
|
37
|
-
*
|
|
38
|
-
* @param code - The error code.
|
|
39
|
-
* @param message - The error message.
|
|
40
|
-
* @constructor
|
|
41
|
-
*/
|
|
42
|
-
class FirebasePhoneNumberVerificationError extends error_1.PrefixedFirebaseError {
|
|
43
|
-
constructor(code, message) {
|
|
44
|
-
super('phone-number-verification', code, message);
|
|
45
|
-
/* tslint:disable:max-line-length */
|
|
46
|
-
// Set the prototype explicitly. See the following link for more details:
|
|
47
|
-
// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
48
|
-
/* tslint:enable:max-line-length */
|
|
49
|
-
this.__proto__ = FirebasePhoneNumberVerificationError.prototype;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.FirebasePhoneNumberVerificationError = FirebasePhoneNumberVerificationError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2025 Google LLC
|
|
@@ -69,4 +69,4 @@ export interface PhoneNumberVerificationToken {
|
|
|
69
69
|
*/
|
|
70
70
|
[key: string]: any;
|
|
71
71
|
}
|
|
72
|
-
export { PhoneNumberVerificationErrorCode, FirebasePhoneNumberVerificationError, } from './
|
|
72
|
+
export { PhoneNumberVerificationErrorCode, FirebasePhoneNumberVerificationError, } from './error';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.FirebasePhoneNumberVerificationError = void 0;
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "
|
|
20
|
+
exports.FirebasePhoneNumberVerificationError = exports.PhoneNumberVerificationErrorCode = void 0;
|
|
21
|
+
var error_1 = require("./error");
|
|
22
|
+
Object.defineProperty(exports, "PhoneNumberVerificationErrorCode", { enumerable: true, get: function () { return error_1.PhoneNumberVerificationErrorCode; } });
|
|
23
|
+
Object.defineProperty(exports, "FirebasePhoneNumberVerificationError", { enumerable: true, get: function () { return error_1.FirebasePhoneNumberVerificationError; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -22,32 +22,53 @@ const phone_number_verification_api_1 = require("./phone-number-verification-api
|
|
|
22
22
|
const util = require("../utils/index");
|
|
23
23
|
const validator = require("../utils/validator");
|
|
24
24
|
const jwt_1 = require("../utils/jwt");
|
|
25
|
-
const
|
|
25
|
+
const error_1 = require("./error");
|
|
26
26
|
class PhoneNumberTokenVerifier {
|
|
27
27
|
constructor(jwksUrl, issuer, tokenInfo, app) {
|
|
28
28
|
this.issuer = issuer;
|
|
29
29
|
this.tokenInfo = tokenInfo;
|
|
30
30
|
this.app = app;
|
|
31
31
|
if (!validator.isURL(jwksUrl)) {
|
|
32
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
32
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
33
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
34
|
+
message: 'The provided public client certificate URL is an invalid URL.',
|
|
35
|
+
});
|
|
33
36
|
}
|
|
34
37
|
else if (!validator.isURL(issuer)) {
|
|
35
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
38
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
39
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
40
|
+
message: 'The provided JWT issuer is an invalid URL.',
|
|
41
|
+
});
|
|
36
42
|
}
|
|
37
43
|
else if (!validator.isNonNullObject(tokenInfo)) {
|
|
38
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
44
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
45
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
46
|
+
message: 'The provided JWT information is not an object or null.',
|
|
47
|
+
});
|
|
39
48
|
}
|
|
40
49
|
else if (!validator.isURL(tokenInfo.url)) {
|
|
41
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
50
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
51
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
52
|
+
message: 'The provided JWT verification documentation URL is invalid.',
|
|
53
|
+
});
|
|
42
54
|
}
|
|
43
55
|
else if (!validator.isNonEmptyString(tokenInfo.verifyApiName)) {
|
|
44
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
56
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
57
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
58
|
+
message: 'The JWT verify API name must be a non-empty string.',
|
|
59
|
+
});
|
|
45
60
|
}
|
|
46
61
|
else if (!validator.isNonEmptyString(tokenInfo.jwtName)) {
|
|
47
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
62
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
63
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
64
|
+
message: 'The JWT public full name must be a non-empty string.',
|
|
65
|
+
});
|
|
48
66
|
}
|
|
49
67
|
else if (!validator.isNonEmptyString(tokenInfo.shortName)) {
|
|
50
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
68
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
69
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
70
|
+
message: 'The JWT public short name must be a non-empty string.',
|
|
71
|
+
});
|
|
51
72
|
}
|
|
52
73
|
this.shortNameArticle = tokenInfo.shortName.charAt(0).match(/[aeiou]/i) ? 'an' : 'a';
|
|
53
74
|
this.signatureVerifier = jwt_1.PublicKeySignatureVerifier.withJwksUrl(jwksUrl, app.options.httpAgent);
|
|
@@ -55,7 +76,10 @@ class PhoneNumberTokenVerifier {
|
|
|
55
76
|
}
|
|
56
77
|
async verifyJWT(jwtToken) {
|
|
57
78
|
if (!validator.isString(jwtToken)) {
|
|
58
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
79
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
80
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_TOKEN,
|
|
81
|
+
message: `First argument to ${this.tokenInfo.verifyApiName} must be a string.`,
|
|
82
|
+
});
|
|
59
83
|
}
|
|
60
84
|
const projectId = await this.ensureProjectId();
|
|
61
85
|
const decoded = await this.decodeAndVerify(jwtToken, projectId);
|
|
@@ -66,8 +90,11 @@ class PhoneNumberTokenVerifier {
|
|
|
66
90
|
async ensureProjectId() {
|
|
67
91
|
const projectId = await util.findProjectId(this.app);
|
|
68
92
|
if (!validator.isNonEmptyString(projectId)) {
|
|
69
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
70
|
-
|
|
93
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
94
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
95
|
+
message: 'Must initialize app with a cert credential or set your Firebase project ID as the ' +
|
|
96
|
+
`GOOGLE_CLOUD_PROJECT environment variable to call ${this.tokenInfo.verifyApiName}.`
|
|
97
|
+
});
|
|
71
98
|
}
|
|
72
99
|
return projectId;
|
|
73
100
|
}
|
|
@@ -88,9 +115,15 @@ class PhoneNumberTokenVerifier {
|
|
|
88
115
|
const errorMessage = `Decoding ${this.tokenInfo.jwtName} failed. Make sure you passed ` +
|
|
89
116
|
`the entire string JWT which represents ${this.shortNameArticle} ` +
|
|
90
117
|
`${this.tokenInfo.shortName}.` + verifyJwtTokenDocsMessage;
|
|
91
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
118
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
119
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
120
|
+
message: errorMessage,
|
|
121
|
+
});
|
|
92
122
|
}
|
|
93
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
123
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
124
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
125
|
+
message: err.message,
|
|
126
|
+
});
|
|
94
127
|
}
|
|
95
128
|
}
|
|
96
129
|
verifyContent(fullDecodedToken, projectId) {
|
|
@@ -135,7 +168,10 @@ class PhoneNumberTokenVerifier {
|
|
|
135
168
|
errorMessage = `${this.tokenInfo.jwtName} has an empty "sub" (subject) claim. ${verifyJwtTokenDocsMessage}`;
|
|
136
169
|
}
|
|
137
170
|
if (errorMessage) {
|
|
138
|
-
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
171
|
+
throw new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
172
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
173
|
+
message: errorMessage,
|
|
174
|
+
});
|
|
139
175
|
}
|
|
140
176
|
}
|
|
141
177
|
async verifySignature(jwtToken) {
|
|
@@ -152,19 +188,31 @@ class PhoneNumberTokenVerifier {
|
|
|
152
188
|
if (error.code === jwt_1.JwtErrorCode.TOKEN_EXPIRED) {
|
|
153
189
|
const errorMessage = `${this.tokenInfo.jwtName} has expired. Get a fresh ${this.tokenInfo.shortName}` +
|
|
154
190
|
` from your client app and try again. ${verifyJwtTokenDocsMessage}`;
|
|
155
|
-
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
191
|
+
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
192
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.EXPIRED_TOKEN,
|
|
193
|
+
message: errorMessage,
|
|
194
|
+
});
|
|
156
195
|
}
|
|
157
196
|
else if (error.code === jwt_1.JwtErrorCode.INVALID_SIGNATURE) {
|
|
158
197
|
const errorMessage = `${this.tokenInfo.jwtName} has invalid signature. ${verifyJwtTokenDocsMessage}`;
|
|
159
|
-
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
198
|
+
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
199
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
200
|
+
message: errorMessage,
|
|
201
|
+
});
|
|
160
202
|
}
|
|
161
203
|
else if (error.code === jwt_1.JwtErrorCode.NO_MATCHING_KID) {
|
|
162
204
|
const errorMessage = `${this.tokenInfo.jwtName} has "kid" claim which does not ` +
|
|
163
205
|
`correspond to a known public key. Most likely the ${this.tokenInfo.shortName} ` +
|
|
164
206
|
'is expired, so get a fresh token from your client app and try again.';
|
|
165
|
-
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError(
|
|
166
|
-
|
|
167
|
-
|
|
207
|
+
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
208
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
209
|
+
message: errorMessage,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return new phone_number_verification_api_1.FirebasePhoneNumberVerificationError({
|
|
213
|
+
code: error_1.FPNV_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
214
|
+
message: error.message,
|
|
215
|
+
});
|
|
168
216
|
}
|
|
169
217
|
}
|
|
170
218
|
exports.PhoneNumberTokenVerifier = PhoneNumberTokenVerifier;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google LLC
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.ShaCertificate = exports.AndroidApp = void 0;
|
|
20
|
-
const error_1 = require("
|
|
20
|
+
const error_1 = require("./error");
|
|
21
21
|
const validator = require("../utils/validator");
|
|
22
22
|
const project_management_api_request_internal_1 = require("./project-management-api-request-internal");
|
|
23
23
|
const app_metadata_1 = require("./app-metadata");
|
|
@@ -34,7 +34,10 @@ class AndroidApp {
|
|
|
34
34
|
this.appId = appId;
|
|
35
35
|
this.requestHandler = requestHandler;
|
|
36
36
|
if (!validator.isNonEmptyString(appId)) {
|
|
37
|
-
throw new error_1.FirebaseProjectManagementError(
|
|
37
|
+
throw new error_1.FirebaseProjectManagementError({
|
|
38
|
+
code: 'invalid-argument',
|
|
39
|
+
message: 'appId must be a non-empty string.'
|
|
40
|
+
});
|
|
38
41
|
}
|
|
39
42
|
this.resourceName = `projects/-/androidApps/${appId}`;
|
|
40
43
|
}
|
|
@@ -117,8 +120,11 @@ class AndroidApp {
|
|
|
117
120
|
*/
|
|
118
121
|
deleteShaCertificate(certificateToDelete) {
|
|
119
122
|
if (!certificateToDelete.resourceName) {
|
|
120
|
-
throw new error_1.FirebaseProjectManagementError(
|
|
121
|
-
|
|
123
|
+
throw new error_1.FirebaseProjectManagementError({
|
|
124
|
+
code: 'invalid-argument',
|
|
125
|
+
message: 'Specified certificate does not include a resourceName. (Use AndroidApp.getShaCertificates() to ' +
|
|
126
|
+
'retrieve certificates with a resourceName.'
|
|
127
|
+
});
|
|
122
128
|
}
|
|
123
129
|
return this.requestHandler.deleteResource(certificateToDelete.resourceName);
|
|
124
130
|
}
|
|
@@ -176,7 +182,10 @@ class ShaCertificate {
|
|
|
176
182
|
this.certType = 'sha256';
|
|
177
183
|
}
|
|
178
184
|
else {
|
|
179
|
-
throw new error_1.FirebaseProjectManagementError(
|
|
185
|
+
throw new error_1.FirebaseProjectManagementError({
|
|
186
|
+
code: 'invalid-argument',
|
|
187
|
+
message: 'shaHash must be either a sha256 hash or a sha1 hash.'
|
|
188
|
+
});
|
|
180
189
|
}
|
|
181
190
|
}
|
|
182
191
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseError, ErrorInfo } from '../utils/error';
|
|
18
|
+
/**
|
|
19
|
+
* The constant mapping for valid Project Management client error codes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ProjectManagementErrorCode: {
|
|
22
|
+
readonly ALREADY_EXISTS: "already-exists";
|
|
23
|
+
readonly AUTHENTICATION_ERROR: "authentication-error";
|
|
24
|
+
readonly INTERNAL_ERROR: "internal-error";
|
|
25
|
+
readonly INVALID_ARGUMENT: "invalid-argument";
|
|
26
|
+
readonly INVALID_PROJECT_ID: "invalid-project-id";
|
|
27
|
+
readonly INVALID_SERVER_RESPONSE: "invalid-server-response";
|
|
28
|
+
readonly NOT_FOUND: "not-found";
|
|
29
|
+
readonly SERVICE_UNAVAILABLE: "service-unavailable";
|
|
30
|
+
readonly UNKNOWN_ERROR: "unknown-error";
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The type definition for valid Project Management client error codes.
|
|
34
|
+
*/
|
|
35
|
+
export type ProjectManagementErrorCode = typeof ProjectManagementErrorCode[keyof typeof ProjectManagementErrorCode];
|
|
36
|
+
/**
|
|
37
|
+
* Firebase project management error code structure. This extends `FirebaseError`.
|
|
38
|
+
*/
|
|
39
|
+
export declare class FirebaseProjectManagementError extends FirebaseError {
|
|
40
|
+
/**
|
|
41
|
+
* @param info - The error code info.
|
|
42
|
+
* @param message - The error message. This will override the default message if provided.
|
|
43
|
+
*/
|
|
44
|
+
constructor(info: ErrorInfo, message?: string);
|
|
45
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
/*!
|
|
4
|
+
* Copyright 2026 Google LLC
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.FirebaseProjectManagementError = exports.ProjectManagementErrorCode = void 0;
|
|
20
|
+
const error_1 = require("../utils/error");
|
|
21
|
+
/**
|
|
22
|
+
* The constant mapping for valid Project Management client error codes.
|
|
23
|
+
*/
|
|
24
|
+
exports.ProjectManagementErrorCode = {
|
|
25
|
+
ALREADY_EXISTS: 'already-exists',
|
|
26
|
+
AUTHENTICATION_ERROR: 'authentication-error',
|
|
27
|
+
INTERNAL_ERROR: 'internal-error',
|
|
28
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
29
|
+
INVALID_PROJECT_ID: 'invalid-project-id',
|
|
30
|
+
INVALID_SERVER_RESPONSE: 'invalid-server-response',
|
|
31
|
+
NOT_FOUND: 'not-found',
|
|
32
|
+
SERVICE_UNAVAILABLE: 'service-unavailable',
|
|
33
|
+
UNKNOWN_ERROR: 'unknown-error',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Firebase project management error code structure. This extends `FirebaseError`.
|
|
37
|
+
*/
|
|
38
|
+
class FirebaseProjectManagementError extends error_1.FirebaseError {
|
|
39
|
+
/**
|
|
40
|
+
* @param info - The error code info.
|
|
41
|
+
* @param message - The error message. This will override the default message if provided.
|
|
42
|
+
*/
|
|
43
|
+
constructor(info, message) {
|
|
44
|
+
// Override default message if custom message provided.
|
|
45
|
+
super({
|
|
46
|
+
code: `project-management/${info.code}`,
|
|
47
|
+
message: message || info.message,
|
|
48
|
+
httpResponse: info.httpResponse,
|
|
49
|
+
cause: info.cause,
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
this.codePrefix = 'project-management';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.FirebaseProjectManagementError = FirebaseProjectManagementError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
*
|
|
@@ -51,4 +51,4 @@ export { IosApp, IosAppMetadata } from './ios-app';
|
|
|
51
51
|
* `ProjectManagement` service associated with the provided app.
|
|
52
52
|
*/
|
|
53
53
|
export declare function getProjectManagement(app?: App): ProjectManagement;
|
|
54
|
-
export { FirebaseProjectManagementError, ProjectManagementErrorCode } from '
|
|
54
|
+
export { FirebaseProjectManagementError, ProjectManagementErrorCode } from './error';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.FirebaseProjectManagementError = exports.IosApp = exports.ShaCertificate = exports.AndroidApp = exports.ProjectManagement = exports.AppPlatform = void 0;
|
|
19
|
+
exports.ProjectManagementErrorCode = exports.FirebaseProjectManagementError = exports.IosApp = exports.ShaCertificate = exports.AndroidApp = exports.ProjectManagement = exports.AppPlatform = void 0;
|
|
20
20
|
exports.getProjectManagement = getProjectManagement;
|
|
21
21
|
/**
|
|
22
22
|
* Firebase project management.
|
|
@@ -66,5 +66,6 @@ function getProjectManagement(app) {
|
|
|
66
66
|
const firebaseApp = app;
|
|
67
67
|
return firebaseApp.getOrInitService('projectManagement', (app) => new project_management_1.ProjectManagement(app));
|
|
68
68
|
}
|
|
69
|
-
var error_1 = require("
|
|
69
|
+
var error_1 = require("./error");
|
|
70
70
|
Object.defineProperty(exports, "FirebaseProjectManagementError", { enumerable: true, get: function () { return error_1.FirebaseProjectManagementError; } });
|
|
71
|
+
Object.defineProperty(exports, "ProjectManagementErrorCode", { enumerable: true, get: function () { return error_1.ProjectManagementErrorCode; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google LLC
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.IosApp = void 0;
|
|
20
|
-
const error_1 = require("
|
|
20
|
+
const error_1 = require("./error");
|
|
21
21
|
const validator = require("../utils/validator");
|
|
22
22
|
const project_management_api_request_internal_1 = require("./project-management-api-request-internal");
|
|
23
23
|
const app_metadata_1 = require("./app-metadata");
|
|
@@ -34,7 +34,10 @@ class IosApp {
|
|
|
34
34
|
this.appId = appId;
|
|
35
35
|
this.requestHandler = requestHandler;
|
|
36
36
|
if (!validator.isNonEmptyString(appId)) {
|
|
37
|
-
throw new error_1.FirebaseProjectManagementError(
|
|
37
|
+
throw new error_1.FirebaseProjectManagementError({
|
|
38
|
+
code: 'invalid-argument',
|
|
39
|
+
message: 'appId must be a non-empty string.'
|
|
40
|
+
});
|
|
38
41
|
}
|
|
39
42
|
this.resourceName = `projects/-/iosApps/${appId}`;
|
|
40
43
|
}
|