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,47 @@
|
|
|
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
|
+
/** @const {Record<string, DataConnectErrorCode>} Data Connect server to client error code mapping. */
|
|
19
|
+
export declare const DATA_CONNECT_ERROR_CODE_MAPPING: Record<string, DataConnectErrorCode>;
|
|
20
|
+
/**
|
|
21
|
+
* The constant mapping for valid Data Connect client error codes.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DataConnectErrorCode: {
|
|
24
|
+
readonly ABORTED: "aborted";
|
|
25
|
+
readonly INVALID_ARGUMENT: "invalid-argument";
|
|
26
|
+
readonly INVALID_CREDENTIAL: "invalid-credential";
|
|
27
|
+
readonly INTERNAL: "internal-error";
|
|
28
|
+
readonly PERMISSION_DENIED: "permission-denied";
|
|
29
|
+
readonly UNAUTHENTICATED: "unauthenticated";
|
|
30
|
+
readonly NOT_FOUND: "not-found";
|
|
31
|
+
readonly UNKNOWN: "unknown-error";
|
|
32
|
+
readonly QUERY_ERROR: "query-error";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The type definition for valid Data Connect client error codes.
|
|
36
|
+
*/
|
|
37
|
+
export type DataConnectErrorCode = typeof DataConnectErrorCode[keyof typeof DataConnectErrorCode];
|
|
38
|
+
/**
|
|
39
|
+
* Firebase Data Connect error code structure. This extends `FirebaseError`.
|
|
40
|
+
*/
|
|
41
|
+
export declare class FirebaseDataConnectError extends FirebaseError {
|
|
42
|
+
/**
|
|
43
|
+
* @param info - The error code info.
|
|
44
|
+
* @param message - The error message. If provided, this will override the default message.
|
|
45
|
+
*/
|
|
46
|
+
constructor(info: ErrorInfo, message?: string);
|
|
47
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.FirebaseDataConnectError = exports.DataConnectErrorCode = exports.DATA_CONNECT_ERROR_CODE_MAPPING = void 0;
|
|
20
|
+
const error_1 = require("../utils/error");
|
|
21
|
+
/** @const {Record<string, DataConnectErrorCode>} Data Connect server to client error code mapping. */
|
|
22
|
+
exports.DATA_CONNECT_ERROR_CODE_MAPPING = {
|
|
23
|
+
ABORTED: 'aborted',
|
|
24
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
25
|
+
INVALID_CREDENTIAL: 'invalid-credential',
|
|
26
|
+
INTERNAL: 'internal-error',
|
|
27
|
+
PERMISSION_DENIED: 'permission-denied',
|
|
28
|
+
UNAUTHENTICATED: 'unauthenticated',
|
|
29
|
+
NOT_FOUND: 'not-found',
|
|
30
|
+
UNKNOWN: 'unknown-error',
|
|
31
|
+
QUERY_ERROR: 'query-error',
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The constant mapping for valid Data Connect client error codes.
|
|
35
|
+
*/
|
|
36
|
+
exports.DataConnectErrorCode = {
|
|
37
|
+
ABORTED: 'aborted',
|
|
38
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
39
|
+
INVALID_CREDENTIAL: 'invalid-credential',
|
|
40
|
+
INTERNAL: 'internal-error',
|
|
41
|
+
PERMISSION_DENIED: 'permission-denied',
|
|
42
|
+
UNAUTHENTICATED: 'unauthenticated',
|
|
43
|
+
NOT_FOUND: 'not-found',
|
|
44
|
+
UNKNOWN: 'unknown-error',
|
|
45
|
+
QUERY_ERROR: 'query-error',
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Firebase Data Connect error code structure. This extends `FirebaseError`.
|
|
49
|
+
*/
|
|
50
|
+
class FirebaseDataConnectError extends error_1.FirebaseError {
|
|
51
|
+
/**
|
|
52
|
+
* @param info - The error code info.
|
|
53
|
+
* @param message - The error message. If provided, this will override the default message.
|
|
54
|
+
*/
|
|
55
|
+
constructor(info, message) {
|
|
56
|
+
super({
|
|
57
|
+
code: `data-connect/${info.code}`,
|
|
58
|
+
message: message || info.message,
|
|
59
|
+
httpResponse: info.httpResponse,
|
|
60
|
+
cause: info.cause,
|
|
61
|
+
});
|
|
62
|
+
/** @internal */
|
|
63
|
+
this.codePrefix = 'data-connect';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.FirebaseDataConnectError = FirebaseDataConnectError;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/**
|
|
3
3
|
* Firebase Data Connect service.
|
|
4
4
|
*
|
|
@@ -44,3 +44,4 @@ export { DataConnect, } from './data-connect';
|
|
|
44
44
|
* if no app is provided, or the `DataConnect` service associated with the provided app.
|
|
45
45
|
*/
|
|
46
46
|
export declare function getDataConnect(connectorConfig: ConnectorConfig, app?: App): DataConnect;
|
|
47
|
+
export { FirebaseDataConnectError, DataConnectErrorCode } from './error';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/**
|
|
4
4
|
* Firebase Data Connect service.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.validateAdminArgs = exports.DataConnect = void 0;
|
|
9
|
+
exports.DataConnectErrorCode = exports.FirebaseDataConnectError = exports.validateAdminArgs = exports.DataConnect = void 0;
|
|
10
10
|
exports.getDataConnect = getDataConnect;
|
|
11
11
|
/*!
|
|
12
12
|
* @license
|
|
@@ -75,3 +75,6 @@ function getDataConnect(connectorConfig, app) {
|
|
|
75
75
|
* @internal
|
|
76
76
|
*/
|
|
77
77
|
exports.validateAdminArgs = validate_admin_args_1._validateAdminArgs;
|
|
78
|
+
var error_1 = require("./error");
|
|
79
|
+
Object.defineProperty(exports, "FirebaseDataConnectError", { enumerable: true, get: function () { return error_1.FirebaseDataConnectError; } });
|
|
80
|
+
Object.defineProperty(exports, "DataConnectErrorCode", { enumerable: true, get: function () { return error_1.DataConnectErrorCode; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports._validateAdminArgs = _validateAdminArgs;
|
|
21
21
|
const index_1 = require("./index");
|
|
22
|
-
const
|
|
22
|
+
const error_1 = require("./error");
|
|
23
23
|
/**
|
|
24
24
|
* @internal
|
|
25
25
|
*
|
|
@@ -73,7 +73,10 @@ function _validateAdminArgs(connectorConfig, dcOrVarsOrOptions, varsOrOptions, o
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
if (!dcInstance || (!realVars && validateVars)) {
|
|
76
|
-
throw new
|
|
76
|
+
throw new error_1.FirebaseDataConnectError({
|
|
77
|
+
code: error_1.DATA_CONNECT_ERROR_CODE_MAPPING.INVALID_ARGUMENT,
|
|
78
|
+
message: 'Variables required.'
|
|
79
|
+
});
|
|
77
80
|
}
|
|
78
81
|
return { dc: dcInstance, vars: realVars, options: realOptions };
|
|
79
82
|
}
|
package/lib/database/database.js
CHANGED
|
@@ -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
|
|
@@ -19,7 +19,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
exports.DatabaseService = void 0;
|
|
20
20
|
const url_1 = require("url");
|
|
21
21
|
const path = require("path");
|
|
22
|
-
const error_1 = require("
|
|
22
|
+
const error_1 = require("./error");
|
|
23
|
+
const error_2 = require("../app/error");
|
|
24
|
+
const error_3 = require("../utils/error");
|
|
23
25
|
const validator = require("../utils/validator");
|
|
24
26
|
const api_request_1 = require("../utils/api-request");
|
|
25
27
|
const index_1 = require("../utils/index");
|
|
@@ -73,7 +75,6 @@ class DatabaseService {
|
|
|
73
75
|
}
|
|
74
76
|
let db = this.databases[dbUrl];
|
|
75
77
|
if (typeof db === 'undefined') {
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
77
78
|
const rtdb = require('@firebase/database-compat/standalone');
|
|
78
79
|
db = rtdb.initStandalone(this.appInternal, dbUrl, (0, index_1.getSdkVersion)()).instance;
|
|
79
80
|
const rulesClient = new DatabaseRulesClient(this.app, dbUrl);
|
|
@@ -94,7 +95,6 @@ class DatabaseService {
|
|
|
94
95
|
}
|
|
95
96
|
return db;
|
|
96
97
|
}
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
98
98
|
onTokenChange(_) {
|
|
99
99
|
const token = this.firebaseApp.INTERNAL.getCachedToken();
|
|
100
100
|
if (token) {
|
|
@@ -161,7 +161,10 @@ class DatabaseRulesClient {
|
|
|
161
161
|
return this.httpClient.send(req)
|
|
162
162
|
.then((resp) => {
|
|
163
163
|
if (!resp.text) {
|
|
164
|
-
throw new
|
|
164
|
+
throw new error_2.FirebaseAppError({
|
|
165
|
+
code: error_2.AppErrorCode.INTERNAL_ERROR,
|
|
166
|
+
message: 'HTTP response missing data.'
|
|
167
|
+
});
|
|
165
168
|
}
|
|
166
169
|
return resp.text;
|
|
167
170
|
})
|
|
@@ -226,8 +229,10 @@ class DatabaseRulesClient {
|
|
|
226
229
|
handleError(err) {
|
|
227
230
|
if (err instanceof api_request_1.RequestResponseError) {
|
|
228
231
|
return new error_1.FirebaseDatabaseError({
|
|
229
|
-
code: error_1.
|
|
232
|
+
code: error_1.DatabaseErrorCode.INTERNAL_ERROR,
|
|
230
233
|
message: this.getErrorMessage(err),
|
|
234
|
+
httpResponse: (0, error_3.toHttpResponse)(err.response),
|
|
235
|
+
cause: err,
|
|
231
236
|
});
|
|
232
237
|
}
|
|
233
238
|
return err;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 Database client error codes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DatabaseErrorCode: {
|
|
22
|
+
readonly INTERNAL_ERROR: "internal-error";
|
|
23
|
+
readonly INVALID_ARGUMENT: "invalid-argument";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The type definition for valid Database client error codes.
|
|
27
|
+
*/
|
|
28
|
+
export type DatabaseErrorCode = typeof DatabaseErrorCode[keyof typeof DatabaseErrorCode];
|
|
29
|
+
/**
|
|
30
|
+
* Firebase Database error code structure. This extends `FirebaseError`.
|
|
31
|
+
*/
|
|
32
|
+
export declare class FirebaseDatabaseError extends FirebaseError {
|
|
33
|
+
/**
|
|
34
|
+
* @param info - The error code info.
|
|
35
|
+
* @param message - The error message. This will override the default
|
|
36
|
+
* message if provided.
|
|
37
|
+
*/
|
|
38
|
+
constructor(info: ErrorInfo, message?: string);
|
|
39
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.FirebaseDatabaseError = exports.DatabaseErrorCode = void 0;
|
|
20
|
+
const error_1 = require("../utils/error");
|
|
21
|
+
/**
|
|
22
|
+
* The constant mapping for valid Database client error codes.
|
|
23
|
+
*/
|
|
24
|
+
exports.DatabaseErrorCode = {
|
|
25
|
+
INTERNAL_ERROR: 'internal-error',
|
|
26
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Firebase Database error code structure. This extends `FirebaseError`.
|
|
30
|
+
*/
|
|
31
|
+
class FirebaseDatabaseError extends error_1.FirebaseError {
|
|
32
|
+
/**
|
|
33
|
+
* @param info - The error code info.
|
|
34
|
+
* @param message - The error message. This will override the default
|
|
35
|
+
* message if provided.
|
|
36
|
+
*/
|
|
37
|
+
constructor(info, message) {
|
|
38
|
+
// Override default message if custom message provided.
|
|
39
|
+
super({
|
|
40
|
+
code: `database/${info.code}`,
|
|
41
|
+
message: message || info.message,
|
|
42
|
+
httpResponse: info.httpResponse,
|
|
43
|
+
cause: info.cause,
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
this.codePrefix = 'database';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.FirebaseDatabaseError = FirebaseDatabaseError;
|
package/lib/database/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v14.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
*
|
|
@@ -88,4 +88,4 @@ export declare function getDatabase(app?: App): Database;
|
|
|
88
88
|
* is provided or the `Database` service associated with the provided app.
|
|
89
89
|
*/
|
|
90
90
|
export declare function getDatabaseWithUrl(url: string, app?: App): Database;
|
|
91
|
-
export { FirebaseDatabaseError } from '
|
|
91
|
+
export { DatabaseErrorCode, FirebaseDatabaseError } from './error';
|
package/lib/database/index.js
CHANGED
|
@@ -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.FirebaseDatabaseError = exports.ServerValue = exports.enableLogging = void 0;
|
|
19
|
+
exports.FirebaseDatabaseError = exports.DatabaseErrorCode = exports.ServerValue = exports.enableLogging = void 0;
|
|
20
20
|
exports.getDatabase = getDatabase;
|
|
21
21
|
exports.getDatabaseWithUrl = getDatabaseWithUrl;
|
|
22
22
|
const standalone_1 = require("@firebase/database-compat/standalone");
|
|
@@ -101,5 +101,6 @@ function getDatabaseInstance(options) {
|
|
|
101
101
|
const dbService = firebaseApp.getOrInitService('database', (app) => new database_1.DatabaseService(app));
|
|
102
102
|
return dbService.getDatabase(options.url);
|
|
103
103
|
}
|
|
104
|
-
var error_1 = require("
|
|
104
|
+
var error_1 = require("./error");
|
|
105
|
+
Object.defineProperty(exports, "DatabaseErrorCode", { enumerable: true, get: function () { return error_1.DatabaseErrorCode; } });
|
|
105
106
|
Object.defineProperty(exports, "FirebaseDatabaseError", { enumerable: true, get: function () { return error_1.FirebaseDatabaseError; } });
|
package/lib/esm/app/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import mod from "../../app/index.js";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const AppErrorCode = mod.AppErrorCode;
|
|
4
4
|
export const FirebaseAppError = mod.FirebaseAppError;
|
|
5
|
+
export const FirebaseError = mod.FirebaseError;
|
|
5
6
|
export const SDK_VERSION = mod.SDK_VERSION;
|
|
6
7
|
export const applicationDefault = mod.applicationDefault;
|
|
7
8
|
export const cert = mod.cert;
|
package/lib/esm/auth/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import mod from "../../auth/index.js";
|
|
2
2
|
|
|
3
3
|
export const Auth = mod.Auth;
|
|
4
|
-
export const
|
|
4
|
+
export const AuthErrorCode = mod.AuthErrorCode;
|
|
5
5
|
export const BaseAuth = mod.BaseAuth;
|
|
6
6
|
export const FirebaseAuthError = mod.FirebaseAuthError;
|
|
7
7
|
export const MultiFactorInfo = mod.MultiFactorInfo;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import mod from "../../data-connect/index.js";
|
|
2
2
|
|
|
3
3
|
export const DataConnect = mod.DataConnect;
|
|
4
|
+
export const DataConnectErrorCode = mod.DataConnectErrorCode;
|
|
5
|
+
export const FirebaseDataConnectError = mod.FirebaseDataConnectError;
|
|
4
6
|
export const getDataConnect = mod.getDataConnect;
|
|
5
7
|
export const validateAdminArgs = mod.validateAdminArgs;
|
|
@@ -2,4 +2,6 @@ import mod from "../../eventarc/index.js";
|
|
|
2
2
|
|
|
3
3
|
export const Channel = mod.Channel;
|
|
4
4
|
export const Eventarc = mod.Eventarc;
|
|
5
|
+
export const EventarcErrorCode = mod.EventarcErrorCode;
|
|
6
|
+
export const FirebaseEventarcError = mod.FirebaseEventarcError;
|
|
5
7
|
export const getEventarc = mod.getEventarc;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import mod from "../../extensions/index.js";
|
|
2
2
|
|
|
3
3
|
export const Extensions = mod.Extensions;
|
|
4
|
+
export const ExtensionsErrorCode = mod.ExtensionsErrorCode;
|
|
5
|
+
export const FirebaseExtensionsError = mod.FirebaseExtensionsError;
|
|
4
6
|
export const Runtime = mod.Runtime;
|
|
5
7
|
export const getExtensions = mod.getExtensions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import mod from "../../index.js";
|
|
2
|
+
|
|
3
|
+
export const AppErrorCode = mod.AppErrorCode;
|
|
4
|
+
export const FirebaseAppError = mod.FirebaseAppError;
|
|
5
|
+
export const FirebaseError = mod.FirebaseError;
|
|
6
|
+
export const SDK_VERSION = mod.SDK_VERSION;
|
|
7
|
+
export const applicationDefault = mod.applicationDefault;
|
|
8
|
+
export const cert = mod.cert;
|
|
9
|
+
export const deleteApp = mod.deleteApp;
|
|
10
|
+
export const getApp = mod.getApp;
|
|
11
|
+
export const getApps = mod.getApps;
|
|
12
|
+
export const initializeApp = mod.initializeApp;
|
|
13
|
+
export const refreshToken = mod.refreshToken;
|
|
@@ -14,6 +14,7 @@ export const FieldValue = mod.FieldValue;
|
|
|
14
14
|
export const Filter = mod.Filter;
|
|
15
15
|
export const FirebaseFirestoreError = mod.FirebaseFirestoreError;
|
|
16
16
|
export const Firestore = mod.Firestore;
|
|
17
|
+
export const FirestoreErrorCode = mod.FirestoreErrorCode;
|
|
17
18
|
export const GeoPoint = mod.GeoPoint;
|
|
18
19
|
export const GrpcStatus = mod.GrpcStatus;
|
|
19
20
|
export const Query = mod.Query;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import mod from "../../functions/index.js";
|
|
2
2
|
|
|
3
|
+
export const FirebaseFunctionsError = mod.FirebaseFunctionsError;
|
|
3
4
|
export const Functions = mod.Functions;
|
|
5
|
+
export const FunctionsErrorCode = mod.FunctionsErrorCode;
|
|
4
6
|
export const TaskQueue = mod.TaskQueue;
|
|
5
7
|
export const getFunctions = mod.getFunctions;
|
|
@@ -2,5 +2,5 @@ import mod from "../../installations/index.js";
|
|
|
2
2
|
|
|
3
3
|
export const FirebaseInstallationsError = mod.FirebaseInstallationsError;
|
|
4
4
|
export const Installations = mod.Installations;
|
|
5
|
-
export const
|
|
5
|
+
export const InstallationsErrorCode = mod.InstallationsErrorCode;
|
|
6
6
|
export const getInstallations = mod.getInstallations;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import mod from "../../machine-learning/index.js";
|
|
2
2
|
|
|
3
|
+
export const FirebaseMachineLearningError = mod.FirebaseMachineLearningError;
|
|
3
4
|
export const MachineLearning = mod.MachineLearning;
|
|
5
|
+
export const MachineLearningErrorCode = mod.MachineLearningErrorCode;
|
|
4
6
|
export const Model = mod.Model;
|
|
5
7
|
export const getMachineLearning = mod.getMachineLearning;
|
|
@@ -2,5 +2,5 @@ import mod from "../../messaging/index.js";
|
|
|
2
2
|
|
|
3
3
|
export const FirebaseMessagingError = mod.FirebaseMessagingError;
|
|
4
4
|
export const Messaging = mod.Messaging;
|
|
5
|
-
export const
|
|
5
|
+
export const MessagingErrorCode = mod.MessagingErrorCode;
|
|
6
6
|
export const getMessaging = mod.getMessaging;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import mod from "../../phone-number-verification/index.js";
|
|
2
2
|
|
|
3
|
+
export const FirebasePhoneNumberVerificationError = mod.FirebasePhoneNumberVerificationError;
|
|
3
4
|
export const PhoneNumberVerification = mod.PhoneNumberVerification;
|
|
5
|
+
export const PhoneNumberVerificationErrorCode = mod.PhoneNumberVerificationErrorCode;
|
|
4
6
|
export const getPhoneNumberVerification = mod.getPhoneNumberVerification;
|
|
@@ -5,5 +5,6 @@ export const AppPlatform = mod.AppPlatform;
|
|
|
5
5
|
export const FirebaseProjectManagementError = mod.FirebaseProjectManagementError;
|
|
6
6
|
export const IosApp = mod.IosApp;
|
|
7
7
|
export const ProjectManagement = mod.ProjectManagement;
|
|
8
|
+
export const ProjectManagementErrorCode = mod.ProjectManagementErrorCode;
|
|
8
9
|
export const ShaCertificate = mod.ShaCertificate;
|
|
9
10
|
export const getProjectManagement = mod.getProjectManagement;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import mod from "../../remote-config/index.js";
|
|
2
2
|
|
|
3
3
|
export const CustomSignalOperator = mod.CustomSignalOperator;
|
|
4
|
+
export const FirebaseRemoteConfigError = mod.FirebaseRemoteConfigError;
|
|
4
5
|
export const PercentConditionOperator = mod.PercentConditionOperator;
|
|
5
6
|
export const RemoteConfig = mod.RemoteConfig;
|
|
7
|
+
export const RemoteConfigErrorCode = mod.RemoteConfigErrorCode;
|
|
6
8
|
export const RemoteConfigFetchResponse = mod.RemoteConfigFetchResponse;
|
|
7
9
|
export const getRemoteConfig = mod.getRemoteConfig;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import mod from "../../security-rules/index.js";
|
|
2
2
|
|
|
3
|
+
export const FirebaseSecurityRulesError = mod.FirebaseSecurityRulesError;
|
|
3
4
|
export const Ruleset = mod.Ruleset;
|
|
4
5
|
export const RulesetMetadataList = mod.RulesetMetadataList;
|
|
5
6
|
export const SecurityRules = mod.SecurityRules;
|
|
7
|
+
export const SecurityRulesErrorCode = mod.SecurityRulesErrorCode;
|
|
6
8
|
export const getSecurityRules = mod.getSecurityRules;
|
package/lib/esm/storage/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import mod from "../../storage/index.js";
|
|
2
2
|
|
|
3
|
+
export const FirebaseStorageError = mod.FirebaseStorageError;
|
|
3
4
|
export const Storage = mod.Storage;
|
|
5
|
+
export const StorageErrorCode = mod.StorageErrorCode;
|
|
4
6
|
export const getDownloadURL = mod.getDownloadURL;
|
|
5
7
|
export const getStorage = mod.getStorage;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 Eventarc client error codes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const EventarcErrorCode: {
|
|
22
|
+
readonly UNKNOWN_ERROR: "unknown-error";
|
|
23
|
+
readonly INVALID_ARGUMENT: "invalid-argument";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The type definition for valid Eventarc client error codes.
|
|
27
|
+
*/
|
|
28
|
+
export type EventarcErrorCode = typeof EventarcErrorCode[keyof typeof EventarcErrorCode];
|
|
29
|
+
/**
|
|
30
|
+
* Firebase Eventarc error code structure. This extends `FirebaseError`.
|
|
31
|
+
*/
|
|
32
|
+
export declare class FirebaseEventarcError extends FirebaseError {
|
|
33
|
+
/**
|
|
34
|
+
* @param info - The error code info.
|
|
35
|
+
* @param message - The error message. If provided, this will override the default message.
|
|
36
|
+
*/
|
|
37
|
+
constructor(info: ErrorInfo, message?: string);
|
|
38
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.FirebaseEventarcError = exports.EventarcErrorCode = void 0;
|
|
20
|
+
const error_1 = require("../utils/error");
|
|
21
|
+
/**
|
|
22
|
+
* The constant mapping for valid Eventarc client error codes.
|
|
23
|
+
*/
|
|
24
|
+
exports.EventarcErrorCode = {
|
|
25
|
+
UNKNOWN_ERROR: 'unknown-error',
|
|
26
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Firebase Eventarc error code structure. This extends `FirebaseError`.
|
|
30
|
+
*/
|
|
31
|
+
class FirebaseEventarcError extends error_1.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
|
+
constructor(info, message) {
|
|
37
|
+
super({
|
|
38
|
+
code: `eventarc/${info.code}`,
|
|
39
|
+
message: message || info.message,
|
|
40
|
+
httpResponse: info.httpResponse,
|
|
41
|
+
cause: info.cause,
|
|
42
|
+
});
|
|
43
|
+
/** @internal */
|
|
44
|
+
this.codePrefix = 'eventarc';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.FirebaseEventarcError = FirebaseEventarcError;
|