firebase-admin 13.0.2 → 13.2.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 +10 -1
- package/lib/auth/action-code-settings-builder.js +7 -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 +15 -1
- package/lib/auth/auth-config.js +28 -2
- 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 +4 -4
- package/lib/auth/base-auth.js +4 -4
- 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 +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 +12 -2
- package/lib/auth/project-config.js +16 -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 +6 -1
- package/lib/data-connect/data-connect-api-client-internal.js +44 -11
- package/lib/data-connect/data-connect-api.d.ts +44 -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 +2 -2
- 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/esm/remote-config/index.js +1 -0
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +1 -1
- package/lib/eventarc/eventarc-utils.d.ts +1 -1
- package/lib/eventarc/eventarc-utils.js +1 -1
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +1 -1
- package/lib/eventarc/index.d.ts +1 -1
- package/lib/eventarc/index.js +1 -1
- package/lib/extensions/extensions-api-client-internal.d.ts +1 -1
- package/lib/extensions/extensions-api-client-internal.js +1 -1
- package/lib/extensions/extensions-api.d.ts +1 -1
- package/lib/extensions/extensions-api.js +1 -1
- package/lib/extensions/extensions.d.ts +1 -1
- package/lib/extensions/extensions.js +1 -1
- package/lib/extensions/index.d.ts +1 -1
- package/lib/extensions/index.js +1 -1
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +1 -1
- package/lib/firestore/firestore-internal.d.ts +1 -1
- package/lib/firestore/firestore-internal.js +1 -1
- package/lib/firestore/firestore-namespace.d.ts +1 -1
- package/lib/firestore/firestore-namespace.js +1 -1
- package/lib/firestore/index.d.ts +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 +14 -2
- 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 +1 -1
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +1 -1
- package/lib/messaging/messaging-errors-internal.js +1 -1
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +1 -1
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +1 -1
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +1 -1
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +1 -1
- package/lib/project-management/index.js +1 -1
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +1 -1
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +1 -1
- package/lib/project-management/project-management-namespace.d.ts +1 -1
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +1 -1
- package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +6 -5
- package/lib/remote-config/index.d.ts +3 -3
- package/lib/remote-config/index.js +3 -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 +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +1 -1
- package/lib/remote-config/remote-config-api.d.ts +35 -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 +20 -2
- package/lib/remote-config/remote-config.js +59 -2
- 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 +1 -1
- package/lib/utils/api-request.js +1 -1
- 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 +5 -1
- package/lib/utils/error.js +8 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +1 -1
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +1 -1
package/lib/auth/user-record.js
CHANGED
package/lib/credential/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2024 Google Inc.
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { PrefixedFirebaseError } from '../utils/error';
|
|
19
|
+
/**
|
|
20
|
+
* When true the SDK should communicate with the Data Connect Emulator for all API
|
|
21
|
+
* calls and also produce unsigned tokens.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useEmulator(): boolean;
|
|
19
24
|
export declare const DATA_CONNECT_ERROR_CODE_MAPPING: {
|
|
20
25
|
[key: string]: DataConnectErrorCode;
|
|
21
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -18,13 +18,16 @@
|
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.FirebaseDataConnectError = exports.DATA_CONNECT_ERROR_CODE_MAPPING = exports.DataConnectApiClient = void 0;
|
|
21
|
+
exports.useEmulator = useEmulator;
|
|
21
22
|
const api_request_1 = require("../utils/api-request");
|
|
22
23
|
const error_1 = require("../utils/error");
|
|
23
24
|
const utils = require("../utils/index");
|
|
24
25
|
const validator = require("../utils/validator");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
26
|
+
const API_VERSION = 'v1alpha';
|
|
27
|
+
/** The Firebase Data Connect backend base URL format. */
|
|
28
|
+
const FIREBASE_DATA_CONNECT_BASE_URL_FORMAT = 'https://firebasedataconnect.googleapis.com/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}:{endpointId}';
|
|
29
|
+
/** Firebase Data Connect base URl format when using the Data Connect emultor. */
|
|
30
|
+
const FIREBASE_DATA_CONNECT_EMULATOR_BASE_URL_FORMAT = 'http://{host}/{version}/projects/{projectId}/locations/{locationId}/services/{serviceId}:{endpointId}';
|
|
28
31
|
const EXECUTE_GRAPH_QL_ENDPOINT = 'executeGraphql';
|
|
29
32
|
const EXECUTE_GRAPH_QL_READ_ENDPOINT = 'executeGraphqlRead';
|
|
30
33
|
const DATA_CONNECT_CONFIG_HEADERS = {
|
|
@@ -42,7 +45,7 @@ class DataConnectApiClient {
|
|
|
42
45
|
if (!validator.isNonNullObject(app) || !('options' in app)) {
|
|
43
46
|
throw new FirebaseDataConnectError(exports.DATA_CONNECT_ERROR_CODE_MAPPING.INVALID_ARGUMENT, 'First argument passed to getDataConnect() must be a valid Firebase app instance.');
|
|
44
47
|
}
|
|
45
|
-
this.httpClient = new
|
|
48
|
+
this.httpClient = new DataConnectHttpClient(app);
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
48
51
|
* Execute arbitrary GraphQL, including both read and write queries
|
|
@@ -74,13 +77,13 @@ class DataConnectApiClient {
|
|
|
74
77
|
throw new FirebaseDataConnectError(exports.DATA_CONNECT_ERROR_CODE_MAPPING.INVALID_ARGUMENT, 'GraphqlOptions must be a non-null object');
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
|
-
const host = (process.env.DATA_CONNECT_EMULATOR_HOST || DATA_CONNECT_HOST);
|
|
78
80
|
const data = {
|
|
79
81
|
query,
|
|
80
82
|
...(options?.variables && { variables: options?.variables }),
|
|
81
83
|
...(options?.operationName && { operationName: options?.operationName }),
|
|
84
|
+
...(options?.impersonate && { extensions: { impersonate: options?.impersonate } }),
|
|
82
85
|
};
|
|
83
|
-
return this.getUrl(
|
|
86
|
+
return this.getUrl(API_VERSION, this.connectorConfig.location, this.connectorConfig.serviceId, endpoint)
|
|
84
87
|
.then(async (url) => {
|
|
85
88
|
const request = {
|
|
86
89
|
method: 'POST',
|
|
@@ -104,18 +107,26 @@ class DataConnectApiClient {
|
|
|
104
107
|
throw this.toFirebaseError(err);
|
|
105
108
|
});
|
|
106
109
|
}
|
|
107
|
-
async getUrl(
|
|
110
|
+
async getUrl(version, locationId, serviceId, endpointId) {
|
|
108
111
|
return this.getProjectId()
|
|
109
112
|
.then((projectId) => {
|
|
110
113
|
const urlParams = {
|
|
111
|
-
|
|
114
|
+
version,
|
|
112
115
|
projectId,
|
|
113
116
|
locationId,
|
|
114
117
|
serviceId,
|
|
115
118
|
endpointId
|
|
116
119
|
};
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
let urlFormat;
|
|
121
|
+
if (useEmulator()) {
|
|
122
|
+
urlFormat = utils.formatString(FIREBASE_DATA_CONNECT_EMULATOR_BASE_URL_FORMAT, {
|
|
123
|
+
host: emulatorHost()
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
urlFormat = FIREBASE_DATA_CONNECT_BASE_URL_FORMAT;
|
|
128
|
+
}
|
|
129
|
+
return utils.formatString(urlFormat, urlParams);
|
|
119
130
|
});
|
|
120
131
|
}
|
|
121
132
|
getProjectId() {
|
|
@@ -151,6 +162,28 @@ class DataConnectApiClient {
|
|
|
151
162
|
}
|
|
152
163
|
}
|
|
153
164
|
exports.DataConnectApiClient = DataConnectApiClient;
|
|
165
|
+
/**
|
|
166
|
+
* Data Connect-specific HTTP client which uses the special "owner" token
|
|
167
|
+
* when communicating with the Data Connect Emulator.
|
|
168
|
+
*/
|
|
169
|
+
class DataConnectHttpClient extends api_request_1.AuthorizedHttpClient {
|
|
170
|
+
getToken() {
|
|
171
|
+
if (useEmulator()) {
|
|
172
|
+
return Promise.resolve('owner');
|
|
173
|
+
}
|
|
174
|
+
return super.getToken();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function emulatorHost() {
|
|
178
|
+
return process.env.DATA_CONNECT_EMULATOR_HOST;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* When true the SDK should communicate with the Data Connect Emulator for all API
|
|
182
|
+
* calls and also produce unsigned tokens.
|
|
183
|
+
*/
|
|
184
|
+
function useEmulator() {
|
|
185
|
+
return !!emulatorHost();
|
|
186
|
+
}
|
|
154
187
|
exports.DATA_CONNECT_ERROR_CODE_MAPPING = {
|
|
155
188
|
ABORTED: 'aborted',
|
|
156
189
|
INVALID_ARGUMENT: 'invalid-argument',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2024 Google Inc.
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { DecodedIdToken } from '../auth/token-verifier';
|
|
18
19
|
/**
|
|
19
20
|
* Interface representing a Data Connect connector configuration.
|
|
20
21
|
*/
|
|
@@ -49,4 +50,46 @@ export interface GraphqlOptions<Variables> {
|
|
|
49
50
|
* The name of the GraphQL operation. Required only if `query` contains multiple operations.
|
|
50
51
|
*/
|
|
51
52
|
operationName?: string;
|
|
53
|
+
/**
|
|
54
|
+
* If set, impersonate a request with given Firebase Auth context and evaluate the auth
|
|
55
|
+
* policies on the operation. If omitted, bypass any defined auth policies.
|
|
56
|
+
*/
|
|
57
|
+
impersonate?: ImpersonateAuthenticated | ImpersonateUnauthenticated;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Type representing the partial claims of a Firebase Auth token used to evaluate the
|
|
61
|
+
* Data Connect auth policy.
|
|
62
|
+
*/
|
|
63
|
+
export type AuthClaims = Partial<DecodedIdToken>;
|
|
64
|
+
/**
|
|
65
|
+
* Interface representing the impersonation of an authenticated user.
|
|
66
|
+
*/
|
|
67
|
+
export interface ImpersonateAuthenticated {
|
|
68
|
+
/**
|
|
69
|
+
* Evaluate the auth policy with a customized JWT auth token. Should follow the Firebase Auth token format.
|
|
70
|
+
* https://firebase.google.com/docs/data-connect/cel-reference#auth-token-contents
|
|
71
|
+
*
|
|
72
|
+
* @example A verified user may have the following `authClaims`:
|
|
73
|
+
* ```json
|
|
74
|
+
* { "sub": "uid", "email_verified": true }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
authClaims: AuthClaims;
|
|
78
|
+
/**
|
|
79
|
+
* Both `authClaims` and `unauthenticated` are mutually exclusive fields and should not be both set.
|
|
80
|
+
*/
|
|
81
|
+
unauthenticated?: never;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Interface representing the impersonation of an unauthenticated user.
|
|
85
|
+
*/
|
|
86
|
+
export interface ImpersonateUnauthenticated {
|
|
87
|
+
/**
|
|
88
|
+
* Both `authClaims` and `unauthenticated` are mutually exclusive fields and should not be both set.
|
|
89
|
+
*/
|
|
90
|
+
authClaims?: never;
|
|
91
|
+
/**
|
|
92
|
+
* Evaluates the auth policy as an unauthenticated request. Can only be set to true.
|
|
93
|
+
*/
|
|
94
|
+
unauthenticated: true;
|
|
52
95
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2024 Google Inc.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { App } from '../app';
|
|
24
24
|
import { DataConnect } from './data-connect';
|
|
25
25
|
import { ConnectorConfig } from './data-connect-api';
|
|
26
|
-
export { GraphqlOptions, ExecuteGraphqlResponse, ConnectorConfig, } from './data-connect-api';
|
|
26
|
+
export { GraphqlOptions, ExecuteGraphqlResponse, ConnectorConfig, ImpersonateAuthenticated, ImpersonateUnauthenticated, AuthClaims } from './data-connect-api';
|
|
27
27
|
export { DataConnect, } from './data-connect';
|
|
28
28
|
/**
|
|
29
29
|
* Gets the {@link DataConnect} service with the provided connector configuration
|
package/lib/database/database.js
CHANGED
package/lib/database/index.d.ts
CHANGED
package/lib/database/index.js
CHANGED
package/lib/default-namespace.js
CHANGED
|
@@ -3,4 +3,5 @@ import mod from "../../remote-config/index.js";
|
|
|
3
3
|
export const CustomSignalOperator = mod.CustomSignalOperator;
|
|
4
4
|
export const PercentConditionOperator = mod.PercentConditionOperator;
|
|
5
5
|
export const RemoteConfig = mod.RemoteConfig;
|
|
6
|
+
export const RemoteConfigFetchResponse = mod.RemoteConfigFetchResponse;
|
|
6
7
|
export const getRemoteConfig = mod.getRemoteConfig;
|
package/lib/eventarc/eventarc.js
CHANGED
package/lib/eventarc/index.d.ts
CHANGED
package/lib/eventarc/index.js
CHANGED
package/lib/extensions/index.js
CHANGED
package/lib/firestore/index.d.ts
CHANGED
package/lib/firestore/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -43,7 +43,7 @@ class FunctionsApiClient {
|
|
|
43
43
|
if (!validator.isNonNullObject(app) || !('options' in app)) {
|
|
44
44
|
throw new FirebaseFunctionsError('invalid-argument', 'First argument passed to getFunctions() must be a valid Firebase app instance.');
|
|
45
45
|
}
|
|
46
|
-
this.httpClient = new
|
|
46
|
+
this.httpClient = new FunctionsHttpClient(app);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Deletes a task from a queue.
|
|
@@ -323,6 +323,18 @@ class FunctionsApiClient {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
exports.FunctionsApiClient = FunctionsApiClient;
|
|
326
|
+
/**
|
|
327
|
+
* Functions-specific HTTP client which uses the special "owner" token
|
|
328
|
+
* when communicating with the Emulator.
|
|
329
|
+
*/
|
|
330
|
+
class FunctionsHttpClient extends api_request_1.AuthorizedHttpClient {
|
|
331
|
+
getToken() {
|
|
332
|
+
if (process.env.CLOUD_TASKS_EMULATOR_HOST) {
|
|
333
|
+
return Promise.resolve('owner');
|
|
334
|
+
}
|
|
335
|
+
return super.getToken();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
326
338
|
exports.FUNCTIONS_ERROR_CODE_MAPPING = {
|
|
327
339
|
ABORTED: 'aborted',
|
|
328
340
|
INVALID_ARGUMENT: 'invalid-argument',
|
package/lib/functions/index.d.ts
CHANGED
package/lib/functions/index.js
CHANGED