@dereekb/firebase-server 13.6.1 → 13.6.3

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/index.cjs.js CHANGED
@@ -9,6 +9,7 @@ var nestjs = require('@dereekb/nestjs');
9
9
  var rxjs = require('rxjs');
10
10
  var firestore = require('@google-cloud/firestore');
11
11
  var common = require('@nestjs/common');
12
+ var core = require('@nestjs/core');
12
13
  var analytics = require('@dereekb/analytics');
13
14
  var nestjs$1 = require('@dereekb/analytics/nestjs');
14
15
  var v2 = require('firebase-functions/v2');
@@ -17,11 +18,10 @@ var admin = require('firebase-admin');
17
18
  var storage = require('@google-cloud/storage');
18
19
  var dateFns = require('date-fns');
19
20
  var types = require('util/types');
20
- var core = require('@nestjs/core');
21
21
  var platformExpress = require('@nestjs/platform-express');
22
22
  var express = require('express');
23
23
 
24
- function _define_property$v(obj, key, value) {
24
+ function _define_property$u(obj, key, value) {
25
25
  if (key in obj) {
26
26
  Object.defineProperty(obj, key, {
27
27
  value: value,
@@ -44,7 +44,7 @@ function _object_spread$h(target) {
44
44
  }));
45
45
  }
46
46
  ownKeys.forEach(function(key) {
47
- _define_property$v(target, key, source[key]);
47
+ _define_property$u(target, key, source[key]);
48
48
  });
49
49
  }
50
50
  return target;
@@ -641,12 +641,12 @@ function _call_super$5(_this, derived, args) {
641
641
  derived = _get_prototype_of$5(derived);
642
642
  return _possible_constructor_return$5(_this, _is_native_reflect_construct$5() ? Reflect.construct(derived, args || [], _get_prototype_of$5(_this).constructor) : derived.apply(_this, args));
643
643
  }
644
- function _class_call_check$p(instance, Constructor) {
644
+ function _class_call_check$o(instance, Constructor) {
645
645
  if (!(instance instanceof Constructor)) {
646
646
  throw new TypeError("Cannot call a class as a function");
647
647
  }
648
648
  }
649
- function _define_property$u(obj, key, value) {
649
+ function _define_property$t(obj, key, value) {
650
650
  if (key in obj) {
651
651
  Object.defineProperty(obj, key, {
652
652
  value: value,
@@ -720,11 +720,11 @@ function _is_native_reflect_construct$5() {
720
720
  */ var FirebaseServerAuthUserExistsError = /*#__PURE__*/ function(BaseError) {
721
721
  _inherits$5(FirebaseServerAuthUserExistsError, BaseError);
722
722
  function FirebaseServerAuthUserExistsError(code, identifierType, identifierValue) {
723
- _class_call_check$p(this, FirebaseServerAuthUserExistsError);
723
+ _class_call_check$o(this, FirebaseServerAuthUserExistsError);
724
724
  var _this;
725
725
  _this = _call_super$5(this, FirebaseServerAuthUserExistsError, [
726
726
  "A user with the provided ".concat(identifierType, " already exists.")
727
- ]), _define_property$u(_this, "code", void 0), _define_property$u(_this, "identifierType", void 0), _define_property$u(_this, "identifierValue", void 0);
727
+ ]), _define_property$t(_this, "code", void 0), _define_property$t(_this, "identifierType", void 0), _define_property$t(_this, "identifierValue", void 0);
728
728
  _this.code = code;
729
729
  _this.identifierType = identifierType;
730
730
  _this.identifierValue = identifierValue;
@@ -749,11 +749,11 @@ function _is_native_reflect_construct$5() {
749
749
  */ var FirebaseServerAuthUserBadInputError = /*#__PURE__*/ function(BaseError) {
750
750
  _inherits$5(FirebaseServerAuthUserBadInputError, BaseError);
751
751
  function FirebaseServerAuthUserBadInputError(code, inputValue, message) {
752
- _class_call_check$p(this, FirebaseServerAuthUserBadInputError);
752
+ _class_call_check$o(this, FirebaseServerAuthUserBadInputError);
753
753
  var _this;
754
754
  _this = _call_super$5(this, FirebaseServerAuthUserBadInputError, [
755
755
  message !== null && message !== void 0 ? message : "Invalid input for user creation: ".concat(inputValue)
756
- ]), _define_property$u(_this, "code", void 0), _define_property$u(_this, "inputValue", void 0);
756
+ ]), _define_property$t(_this, "code", void 0), _define_property$t(_this, "inputValue", void 0);
757
757
  _this.code = code;
758
758
  _this.inputValue = inputValue;
759
759
  return _this;
@@ -765,7 +765,7 @@ function _is_native_reflect_construct$5() {
765
765
  */ var FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError = /*#__PURE__*/ function(BaseError) {
766
766
  _inherits$5(FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError, BaseError);
767
767
  function FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError() {
768
- _class_call_check$p(this, FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError);
768
+ _class_call_check$o(this, FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError);
769
769
  return _call_super$5(this, FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError, [
770
770
  "This user has no setup configuration available."
771
771
  ]);
@@ -777,11 +777,11 @@ function _is_native_reflect_construct$5() {
777
777
  */ var FirebaseServerAuthNewUserSendSetupDetailsThrottleError = /*#__PURE__*/ function(BaseError) {
778
778
  _inherits$5(FirebaseServerAuthNewUserSendSetupDetailsThrottleError, BaseError);
779
779
  function FirebaseServerAuthNewUserSendSetupDetailsThrottleError(lastSentAt) {
780
- _class_call_check$p(this, FirebaseServerAuthNewUserSendSetupDetailsThrottleError);
780
+ _class_call_check$o(this, FirebaseServerAuthNewUserSendSetupDetailsThrottleError);
781
781
  var _this;
782
782
  _this = _call_super$5(this, FirebaseServerAuthNewUserSendSetupDetailsThrottleError, [
783
783
  "This user was recently sent details. Try again later."
784
- ]), _define_property$u(_this, "lastSentAt", void 0);
784
+ ]), _define_property$t(_this, "lastSentAt", void 0);
785
785
  _this.lastSentAt = lastSentAt;
786
786
  return _this;
787
787
  }
@@ -793,7 +793,7 @@ function _is_native_reflect_construct$5() {
793
793
  */ var FirebaseServerAuthNewUserSendSetupDetailsSendOnceError = /*#__PURE__*/ function(BaseError) {
794
794
  _inherits$5(FirebaseServerAuthNewUserSendSetupDetailsSendOnceError, BaseError);
795
795
  function FirebaseServerAuthNewUserSendSetupDetailsSendOnceError() {
796
- _class_call_check$p(this, FirebaseServerAuthNewUserSendSetupDetailsSendOnceError);
796
+ _class_call_check$o(this, FirebaseServerAuthNewUserSendSetupDetailsSendOnceError);
797
797
  return _call_super$5(this, FirebaseServerAuthNewUserSendSetupDetailsSendOnceError, [
798
798
  "The user has been sent details before and the sendSetupDetailsOnce configuration was true."
799
799
  ]);
@@ -852,12 +852,12 @@ function _call_super$4(_this, derived, args) {
852
852
  derived = _get_prototype_of$4(derived);
853
853
  return _possible_constructor_return$4(_this, _is_native_reflect_construct$4() ? Reflect.construct(derived, args || [], _get_prototype_of$4(_this).constructor) : derived.apply(_this, args));
854
854
  }
855
- function _class_call_check$o(instance, Constructor) {
855
+ function _class_call_check$n(instance, Constructor) {
856
856
  if (!(instance instanceof Constructor)) {
857
857
  throw new TypeError("Cannot call a class as a function");
858
858
  }
859
859
  }
860
- function _defineProperties$e(target, props) {
860
+ function _defineProperties$d(target, props) {
861
861
  for(var i = 0; i < props.length; i++){
862
862
  var descriptor = props[i];
863
863
  descriptor.enumerable = descriptor.enumerable || false;
@@ -866,11 +866,11 @@ function _defineProperties$e(target, props) {
866
866
  Object.defineProperty(target, descriptor.key, descriptor);
867
867
  }
868
868
  }
869
- function _create_class$e(Constructor, protoProps, staticProps) {
870
- if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
869
+ function _create_class$d(Constructor, protoProps, staticProps) {
870
+ if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
871
871
  return Constructor;
872
872
  }
873
- function _define_property$t(obj, key, value) {
873
+ function _define_property$s(obj, key, value) {
874
874
  if (key in obj) {
875
875
  Object.defineProperty(obj, key, {
876
876
  value: value,
@@ -945,7 +945,7 @@ function _object_spread$g(target) {
945
945
  }));
946
946
  }
947
947
  ownKeys.forEach(function(key) {
948
- _define_property$t(target, key, source[key]);
948
+ _define_property$s(target, key, source[key]);
949
949
  });
950
950
  }
951
951
  return target;
@@ -1121,16 +1121,16 @@ function _ts_generator$b(thisArg, body) {
1121
1121
  */ var AbstractFirebaseServerAuthUserContext = /*#__PURE__*/ function() {
1122
1122
  function AbstractFirebaseServerAuthUserContext(service, uid) {
1123
1123
  var _this = this;
1124
- _class_call_check$o(this, AbstractFirebaseServerAuthUserContext);
1125
- _define_property$t(this, "_service", void 0);
1126
- _define_property$t(this, "_uid", void 0);
1127
- _define_property$t(this, "_loadRecord", util.cachedGetter(function() {
1124
+ _class_call_check$n(this, AbstractFirebaseServerAuthUserContext);
1125
+ _define_property$s(this, "_service", void 0);
1126
+ _define_property$s(this, "_uid", void 0);
1127
+ _define_property$s(this, "_loadRecord", util.cachedGetter(function() {
1128
1128
  return _this._service.auth.getUser(_this._uid);
1129
1129
  }));
1130
1130
  this._service = service;
1131
1131
  this._uid = uid;
1132
1132
  }
1133
- _create_class$e(AbstractFirebaseServerAuthUserContext, [
1133
+ _create_class$d(AbstractFirebaseServerAuthUserContext, [
1134
1134
  {
1135
1135
  key: "service",
1136
1136
  get: function get() {
@@ -1192,7 +1192,7 @@ function _ts_generator$b(thisArg, body) {
1192
1192
  switch(_state.label){
1193
1193
  case 0:
1194
1194
  password = this._generateResetPasswordKey();
1195
- passwordClaimsData = (_obj = {}, _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, password), _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, date.toISODateString(new Date())), _obj);
1195
+ passwordClaimsData = (_obj = {}, _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, password), _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, date.toISODateString(new Date())), _obj);
1196
1196
  // set the claims
1197
1197
  return [
1198
1198
  4,
@@ -1261,7 +1261,7 @@ function _ts_generator$b(thisArg, body) {
1261
1261
  // clear password reset claims
1262
1262
  return [
1263
1263
  4,
1264
- this.updateClaims((_obj = {}, _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, null), _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, null), _obj))
1264
+ this.updateClaims((_obj = {}, _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, null), _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, null), _obj))
1265
1265
  ];
1266
1266
  case 2:
1267
1267
  _state.sent();
@@ -1453,25 +1453,25 @@ function _ts_generator$b(thisArg, body) {
1453
1453
  */ var AbstractFirebaseServerAuthContext = /*#__PURE__*/ function() {
1454
1454
  function AbstractFirebaseServerAuthContext(service, context) {
1455
1455
  var _this = this;
1456
- _class_call_check$o(this, AbstractFirebaseServerAuthContext);
1457
- _define_property$t(this, "_service", void 0);
1458
- _define_property$t(this, "_context", void 0);
1459
- _define_property$t(this, "_authRoles", util.cachedGetter(function() {
1456
+ _class_call_check$n(this, AbstractFirebaseServerAuthContext);
1457
+ _define_property$s(this, "_service", void 0);
1458
+ _define_property$s(this, "_context", void 0);
1459
+ _define_property$s(this, "_authRoles", util.cachedGetter(function() {
1460
1460
  return _this.service.readRoles(_this.claims);
1461
1461
  }));
1462
- _define_property$t(this, "_isAdmin", util.cachedGetter(function() {
1462
+ _define_property$s(this, "_isAdmin", util.cachedGetter(function() {
1463
1463
  return _this.service.isAdminInRoles(_this._authRoles());
1464
1464
  }));
1465
- _define_property$t(this, "_hasSignedTos", util.cachedGetter(function() {
1465
+ _define_property$s(this, "_hasSignedTos", util.cachedGetter(function() {
1466
1466
  return _this.service.hasSignedTosInRoles(_this._authRoles());
1467
1467
  }));
1468
- _define_property$t(this, "_userContext", util.cachedGetter(function() {
1468
+ _define_property$s(this, "_userContext", util.cachedGetter(function() {
1469
1469
  return _this.service.userContext(_this.context.auth.uid);
1470
1470
  }));
1471
1471
  this._service = service;
1472
1472
  this._context = context;
1473
1473
  }
1474
- _create_class$e(AbstractFirebaseServerAuthContext, [
1474
+ _create_class$d(AbstractFirebaseServerAuthContext, [
1475
1475
  {
1476
1476
  key: "service",
1477
1477
  get: function get() {
@@ -1571,15 +1571,15 @@ function _ts_generator$b(thisArg, body) {
1571
1571
  * ```
1572
1572
  */ var AbstractFirebaseServerNewUserService = /*#__PURE__*/ function() {
1573
1573
  function AbstractFirebaseServerNewUserService(authService) {
1574
- _class_call_check$o(this, AbstractFirebaseServerNewUserService);
1575
- _define_property$t(this, "_authService", void 0);
1574
+ _class_call_check$n(this, AbstractFirebaseServerNewUserService);
1575
+ _define_property$s(this, "_authService", void 0);
1576
1576
  /**
1577
1577
  * Minimum time between setup content sends. Defaults to {@link DEFAULT_SETUP_COM_THROTTLE_TIME} (1 hour).
1578
1578
  * Override in subclasses to customize the throttle window.
1579
- */ _define_property$t(this, "setupThrottleTime", DEFAULT_SETUP_COM_THROTTLE_TIME);
1579
+ */ _define_property$s(this, "setupThrottleTime", DEFAULT_SETUP_COM_THROTTLE_TIME);
1580
1580
  this._authService = authService;
1581
1581
  }
1582
- _create_class$e(AbstractFirebaseServerNewUserService, [
1582
+ _create_class$d(AbstractFirebaseServerNewUserService, [
1583
1583
  {
1584
1584
  key: "authService",
1585
1585
  get: function get() {
@@ -1695,7 +1695,7 @@ function _ts_generator$b(thisArg, body) {
1695
1695
  userContext = userContextFromUid(this.authService, userContextOrUid);
1696
1696
  return [
1697
1697
  4,
1698
- userContext.updateClaims(_define_property$t({}, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, password))
1698
+ userContext.updateClaims(_define_property$s({}, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, password))
1699
1699
  ];
1700
1700
  case 1:
1701
1701
  _state.sent();
@@ -2013,7 +2013,7 @@ function _ts_generator$b(thisArg, body) {
2013
2013
  case 0:
2014
2014
  return [
2015
2015
  4,
2016
- userContext.updateClaims((_obj = {}, _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, null), _define_property$t(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, null), _obj))
2016
+ userContext.updateClaims((_obj = {}, _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, null), _define_property$s(_obj, firebase.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, null), _obj))
2017
2017
  ];
2018
2018
  case 1:
2019
2019
  _state.sent();
@@ -2035,10 +2035,10 @@ function _ts_generator$b(thisArg, body) {
2035
2035
  */ var NoSetupContentFirebaseServerNewUserService = /*#__PURE__*/ function(AbstractFirebaseServerNewUserService) {
2036
2036
  _inherits$4(NoSetupContentFirebaseServerNewUserService, AbstractFirebaseServerNewUserService);
2037
2037
  function NoSetupContentFirebaseServerNewUserService() {
2038
- _class_call_check$o(this, NoSetupContentFirebaseServerNewUserService);
2038
+ _class_call_check$n(this, NoSetupContentFirebaseServerNewUserService);
2039
2039
  return _call_super$4(this, NoSetupContentFirebaseServerNewUserService, arguments);
2040
2040
  }
2041
- _create_class$e(NoSetupContentFirebaseServerNewUserService, [
2041
+ _create_class$d(NoSetupContentFirebaseServerNewUserService, [
2042
2042
  {
2043
2043
  key: "sendSetupContentToUser",
2044
2044
  value: function sendSetupContentToUser(_details) {
@@ -2075,7 +2075,7 @@ function _ts_generator$b(thisArg, body) {
2075
2075
  * }
2076
2076
  * ```
2077
2077
  */ var FirebaseServerAuthService = function FirebaseServerAuthService() {
2078
- _class_call_check$o(this, FirebaseServerAuthService);
2078
+ _class_call_check$n(this, FirebaseServerAuthService);
2079
2079
  };
2080
2080
  /**
2081
2081
  * Base implementation of {@link FirebaseServerAuthService} providing standard admin/ToS checks,
@@ -2106,11 +2106,11 @@ function _ts_generator$b(thisArg, body) {
2106
2106
  * ```
2107
2107
  */ var AbstractFirebaseServerAuthService = /*#__PURE__*/ function() {
2108
2108
  function AbstractFirebaseServerAuthService(auth) {
2109
- _class_call_check$o(this, AbstractFirebaseServerAuthService);
2110
- _define_property$t(this, "_auth", void 0);
2109
+ _class_call_check$n(this, AbstractFirebaseServerAuthService);
2110
+ _define_property$s(this, "_auth", void 0);
2111
2111
  this._auth = auth;
2112
2112
  }
2113
- _create_class$e(AbstractFirebaseServerAuthService, [
2113
+ _create_class$d(AbstractFirebaseServerAuthService, [
2114
2114
  {
2115
2115
  key: "auth",
2116
2116
  get: function get() {
@@ -2248,7 +2248,7 @@ function _ts_generator$b(thisArg, body) {
2248
2248
  ];
2249
2249
  }
2250
2250
 
2251
- function _class_call_check$n(instance, Constructor) {
2251
+ function _class_call_check$m(instance, Constructor) {
2252
2252
  if (!(instance instanceof Constructor)) {
2253
2253
  throw new TypeError("Cannot call a class as a function");
2254
2254
  }
@@ -2260,7 +2260,7 @@ function _class_call_check$n(instance, Constructor) {
2260
2260
  * Implementations are typically injected via {@link FIREBASE_SERVER_ENV_TOKEN} and
2261
2261
  * backed by a {@link FirebaseServerEnvironmentConfig}.
2262
2262
  */ var FirebaseServerEnvService = function FirebaseServerEnvService() {
2263
- _class_call_check$n(this, FirebaseServerEnvService);
2263
+ _class_call_check$m(this, FirebaseServerEnvService);
2264
2264
  }
2265
2265
  ;
2266
2266
 
@@ -2294,7 +2294,7 @@ function _array_like_to_array$9(arr, len) {
2294
2294
  function _array_without_holes$6(arr) {
2295
2295
  if (Array.isArray(arr)) return _array_like_to_array$9(arr);
2296
2296
  }
2297
- function _define_property$s(obj, key, value) {
2297
+ function _define_property$r(obj, key, value) {
2298
2298
  if (key in obj) {
2299
2299
  Object.defineProperty(obj, key, {
2300
2300
  value: value,
@@ -2323,7 +2323,7 @@ function _object_spread$f(target) {
2323
2323
  }));
2324
2324
  }
2325
2325
  ownKeys.forEach(function(key) {
2326
- _define_property$s(target, key, source[key]);
2326
+ _define_property$r(target, key, source[key]);
2327
2327
  });
2328
2328
  }
2329
2329
  return target;
@@ -2373,12 +2373,12 @@ function _unsupported_iterable_to_array$9(o, minLen) {
2373
2373
  return updateData;
2374
2374
  }
2375
2375
 
2376
- function _class_call_check$m(instance, Constructor) {
2376
+ function _class_call_check$l(instance, Constructor) {
2377
2377
  if (!(instance instanceof Constructor)) {
2378
2378
  throw new TypeError("Cannot call a class as a function");
2379
2379
  }
2380
2380
  }
2381
- function _defineProperties$d(target, props) {
2381
+ function _defineProperties$c(target, props) {
2382
2382
  for(var i = 0; i < props.length; i++){
2383
2383
  var descriptor = props[i];
2384
2384
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2387,11 +2387,11 @@ function _defineProperties$d(target, props) {
2387
2387
  Object.defineProperty(target, descriptor.key, descriptor);
2388
2388
  }
2389
2389
  }
2390
- function _create_class$d(Constructor, protoProps, staticProps) {
2391
- if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
2390
+ function _create_class$c(Constructor, protoProps, staticProps) {
2391
+ if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
2392
2392
  return Constructor;
2393
2393
  }
2394
- function _define_property$r(obj, key, value) {
2394
+ function _define_property$q(obj, key, value) {
2395
2395
  if (key in obj) {
2396
2396
  Object.defineProperty(obj, key, {
2397
2397
  value: value,
@@ -2413,13 +2413,13 @@ function _define_property$r(obj, key, value) {
2413
2413
  * (get, exists) bypass the batch and read directly from Firestore.
2414
2414
  */ var WriteBatchFirestoreDocumentDataAccessor = /*#__PURE__*/ function() {
2415
2415
  function WriteBatchFirestoreDocumentDataAccessor(batch, documentRef) {
2416
- _class_call_check$m(this, WriteBatchFirestoreDocumentDataAccessor);
2417
- _define_property$r(this, "documentRef", void 0);
2418
- _define_property$r(this, "_batch", void 0);
2416
+ _class_call_check$l(this, WriteBatchFirestoreDocumentDataAccessor);
2417
+ _define_property$q(this, "documentRef", void 0);
2418
+ _define_property$q(this, "_batch", void 0);
2419
2419
  this.documentRef = documentRef;
2420
2420
  this._batch = batch;
2421
2421
  }
2422
- _create_class$d(WriteBatchFirestoreDocumentDataAccessor, [
2422
+ _create_class$c(WriteBatchFirestoreDocumentDataAccessor, [
2423
2423
  {
2424
2424
  key: "batch",
2425
2425
  get: function get() {
@@ -2530,14 +2530,14 @@ function _define_property$r(obj, key, value) {
2530
2530
  * All document accessors created from this context queue writes into the same batch.
2531
2531
  */ var WriteBatchFirestoreDocumentContext = /*#__PURE__*/ function() {
2532
2532
  function WriteBatchFirestoreDocumentContext(batch) {
2533
- _class_call_check$m(this, WriteBatchFirestoreDocumentContext);
2534
- _define_property$r(this, "_batch", void 0);
2535
- _define_property$r(this, "contextType", firebase.FirestoreDocumentContextType.BATCH);
2536
- _define_property$r(this, "accessorFactory", void 0);
2533
+ _class_call_check$l(this, WriteBatchFirestoreDocumentContext);
2534
+ _define_property$q(this, "_batch", void 0);
2535
+ _define_property$q(this, "contextType", firebase.FirestoreDocumentContextType.BATCH);
2536
+ _define_property$q(this, "accessorFactory", void 0);
2537
2537
  this._batch = batch;
2538
2538
  this.accessorFactory = writeBatchAccessorFactory(batch);
2539
2539
  }
2540
- _create_class$d(WriteBatchFirestoreDocumentContext, [
2540
+ _create_class$c(WriteBatchFirestoreDocumentContext, [
2541
2541
  {
2542
2542
  key: "batch",
2543
2543
  get: function get() {
@@ -2556,12 +2556,12 @@ function _define_property$r(obj, key, value) {
2556
2556
  return new WriteBatchFirestoreDocumentContext(batch);
2557
2557
  }
2558
2558
 
2559
- function _class_call_check$l(instance, Constructor) {
2559
+ function _class_call_check$k(instance, Constructor) {
2560
2560
  if (!(instance instanceof Constructor)) {
2561
2561
  throw new TypeError("Cannot call a class as a function");
2562
2562
  }
2563
2563
  }
2564
- function _defineProperties$c(target, props) {
2564
+ function _defineProperties$b(target, props) {
2565
2565
  for(var i = 0; i < props.length; i++){
2566
2566
  var descriptor = props[i];
2567
2567
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2570,11 +2570,11 @@ function _defineProperties$c(target, props) {
2570
2570
  Object.defineProperty(target, descriptor.key, descriptor);
2571
2571
  }
2572
2572
  }
2573
- function _create_class$c(Constructor, protoProps, staticProps) {
2574
- if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
2573
+ function _create_class$b(Constructor, protoProps, staticProps) {
2574
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
2575
2575
  return Constructor;
2576
2576
  }
2577
- function _define_property$q(obj, key, value) {
2577
+ function _define_property$p(obj, key, value) {
2578
2578
  if (key in obj) {
2579
2579
  Object.defineProperty(obj, key, {
2580
2580
  value: value,
@@ -2595,11 +2595,11 @@ function _define_property$q(obj, key, value) {
2595
2595
  * batching or transactional context. Supports real-time streaming via `onSnapshot`.
2596
2596
  */ var DefaultFirestoreDocumentDataAccessor = /*#__PURE__*/ function() {
2597
2597
  function DefaultFirestoreDocumentDataAccessor(documentRef) {
2598
- _class_call_check$l(this, DefaultFirestoreDocumentDataAccessor);
2599
- _define_property$q(this, "_documentRef", void 0);
2598
+ _class_call_check$k(this, DefaultFirestoreDocumentDataAccessor);
2599
+ _define_property$p(this, "_documentRef", void 0);
2600
2600
  this._documentRef = documentRef;
2601
2601
  }
2602
- _create_class$c(DefaultFirestoreDocumentDataAccessor, [
2602
+ _create_class$b(DefaultFirestoreDocumentDataAccessor, [
2603
2603
  {
2604
2604
  key: "documentRef",
2605
2605
  get: function get() {
@@ -2706,12 +2706,12 @@ function _define_property$q(obj, key, value) {
2706
2706
  };
2707
2707
  }
2708
2708
 
2709
- function _class_call_check$k(instance, Constructor) {
2709
+ function _class_call_check$j(instance, Constructor) {
2710
2710
  if (!(instance instanceof Constructor)) {
2711
2711
  throw new TypeError("Cannot call a class as a function");
2712
2712
  }
2713
2713
  }
2714
- function _defineProperties$b(target, props) {
2714
+ function _defineProperties$a(target, props) {
2715
2715
  for(var i = 0; i < props.length; i++){
2716
2716
  var descriptor = props[i];
2717
2717
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2720,11 +2720,11 @@ function _defineProperties$b(target, props) {
2720
2720
  Object.defineProperty(target, descriptor.key, descriptor);
2721
2721
  }
2722
2722
  }
2723
- function _create_class$b(Constructor, protoProps, staticProps) {
2724
- if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
2723
+ function _create_class$a(Constructor, protoProps, staticProps) {
2724
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
2725
2725
  return Constructor;
2726
2726
  }
2727
- function _define_property$p(obj, key, value) {
2727
+ function _define_property$o(obj, key, value) {
2728
2728
  if (key in obj) {
2729
2729
  Object.defineProperty(obj, key, {
2730
2730
  value: value,
@@ -2746,13 +2746,13 @@ function _define_property$p(obj, key, value) {
2746
2746
  * consistency. Writes are committed atomically when the transaction completes.
2747
2747
  */ var TransactionFirestoreDocumentDataAccessor = /*#__PURE__*/ function() {
2748
2748
  function TransactionFirestoreDocumentDataAccessor(transaction, documentRef) {
2749
- _class_call_check$k(this, TransactionFirestoreDocumentDataAccessor);
2750
- _define_property$p(this, "_transaction", void 0);
2751
- _define_property$p(this, "_documentRef", void 0);
2749
+ _class_call_check$j(this, TransactionFirestoreDocumentDataAccessor);
2750
+ _define_property$o(this, "_transaction", void 0);
2751
+ _define_property$o(this, "_documentRef", void 0);
2752
2752
  this._transaction = transaction;
2753
2753
  this._documentRef = documentRef;
2754
2754
  }
2755
- _create_class$b(TransactionFirestoreDocumentDataAccessor, [
2755
+ _create_class$a(TransactionFirestoreDocumentDataAccessor, [
2756
2756
  {
2757
2757
  key: "transaction",
2758
2758
  get: function get() {
@@ -2870,14 +2870,14 @@ function _define_property$p(obj, key, value) {
2870
2870
  * All document accessors created from this context operate within the same transaction.
2871
2871
  */ var TransactionFirestoreDocumentContext = /*#__PURE__*/ function() {
2872
2872
  function TransactionFirestoreDocumentContext(transaction) {
2873
- _class_call_check$k(this, TransactionFirestoreDocumentContext);
2874
- _define_property$p(this, "_transaction", void 0);
2875
- _define_property$p(this, "contextType", firebase.FirestoreDocumentContextType.TRANSACTION);
2876
- _define_property$p(this, "accessorFactory", void 0);
2873
+ _class_call_check$j(this, TransactionFirestoreDocumentContext);
2874
+ _define_property$o(this, "_transaction", void 0);
2875
+ _define_property$o(this, "contextType", firebase.FirestoreDocumentContextType.TRANSACTION);
2876
+ _define_property$o(this, "accessorFactory", void 0);
2877
2877
  this._transaction = transaction;
2878
2878
  this.accessorFactory = transactionAccessorFactory(transaction);
2879
2879
  }
2880
- _create_class$b(TransactionFirestoreDocumentContext, [
2880
+ _create_class$a(TransactionFirestoreDocumentContext, [
2881
2881
  {
2882
2882
  key: "transaction",
2883
2883
  get: function get() {
@@ -3197,7 +3197,7 @@ function _array_like_to_array$7(arr, len) {
3197
3197
  function _array_without_holes$5(arr) {
3198
3198
  if (Array.isArray(arr)) return _array_like_to_array$7(arr);
3199
3199
  }
3200
- function _define_property$o(obj, key, value) {
3200
+ function _define_property$n(obj, key, value) {
3201
3201
  if (key in obj) {
3202
3202
  Object.defineProperty(obj, key, {
3203
3203
  value: value,
@@ -3226,7 +3226,7 @@ function _object_spread$e(target) {
3226
3226
  }));
3227
3227
  }
3228
3228
  ownKeys.forEach(function(key) {
3229
- _define_property$o(target, key, source[key]);
3229
+ _define_property$n(target, key, source[key]);
3230
3230
  });
3231
3231
  }
3232
3232
  return target;
@@ -3267,31 +3267,31 @@ var _obj;
3267
3267
  * Maps each abstract query constraint type to its Google Cloud Firestore implementation.
3268
3268
  *
3269
3269
  * Used by {@link firestoreClientQueryConstraintFunctionsDriver} to build the server-side query driver.
3270
- */ var FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING = (_obj = {}, _define_property$o(_obj, firebase.FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3270
+ */ var FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING = (_obj = {}, _define_property$n(_obj, firebase.FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3271
3271
  return builder.limit(data.limit);
3272
- }), _define_property$o(_obj, firebase.FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3272
+ }), _define_property$n(_obj, firebase.FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3273
3273
  return builder.limitToLast(data.limit);
3274
- }), _define_property$o(_obj, firebase.FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3274
+ }), _define_property$n(_obj, firebase.FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3275
3275
  return builder.orderBy(data.fieldPath, data.directionStr);
3276
- }), _define_property$o(_obj, firebase.FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3276
+ }), _define_property$n(_obj, firebase.FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3277
3277
  return builder.orderBy(firestore.FieldPath.documentId(), data.directionStr);
3278
- }), _define_property$o(_obj, firebase.FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3278
+ }), _define_property$n(_obj, firebase.FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3279
3279
  return builder.where(data.fieldPath, data.opStr, data.value);
3280
- }), _define_property$o(_obj, firebase.FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3280
+ }), _define_property$n(_obj, firebase.FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3281
3281
  return builder.where(firestore.FieldPath.documentId(), data.opStr, data.value);
3282
- }), _define_property$o(_obj, firebase.FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3282
+ }), _define_property$n(_obj, firebase.FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3283
3283
  return builder.offset(data.offset);
3284
- }), _define_property$o(_obj, firebase.FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3284
+ }), _define_property$n(_obj, firebase.FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3285
3285
  return builder.startAt(data.snapshot);
3286
- }), _define_property$o(_obj, firebase.FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3286
+ }), _define_property$n(_obj, firebase.FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3287
3287
  return (_builder = builder).startAt.apply(_builder, _to_consumable_array$5(data.fieldValues));
3288
- }), _define_property$o(_obj, firebase.FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3288
+ }), _define_property$n(_obj, firebase.FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3289
3289
  return builder.startAfter(data.snapshot);
3290
- }), _define_property$o(_obj, firebase.FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3290
+ }), _define_property$n(_obj, firebase.FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3291
3291
  return builder.endAt(data.snapshot);
3292
- }), _define_property$o(_obj, firebase.FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3292
+ }), _define_property$n(_obj, firebase.FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3293
3293
  return (_builder1 = builder).endAt.apply(_builder1, _to_consumable_array$5(data.fieldValues));
3294
- }), _define_property$o(_obj, firebase.FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3294
+ }), _define_property$n(_obj, firebase.FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, function(builder, data) {
3295
3295
  return builder.endBefore(data.snapshot);
3296
3296
  }), _obj);
3297
3297
  /**
@@ -3743,7 +3743,7 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
3743
3743
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3744
3744
  };
3745
3745
 
3746
- function _class_call_check$j(instance, Constructor) {
3746
+ function _class_call_check$i(instance, Constructor) {
3747
3747
  if (!(instance instanceof Constructor)) {
3748
3748
  throw new TypeError("Cannot call a class as a function");
3749
3749
  }
@@ -3754,7 +3754,7 @@ function _class_call_check$j(instance, Constructor) {
3754
3754
  * Analogous to {@link DbxAnalyticsService} on the frontend.
3755
3755
  * Apps extend this class and provide it via {@link ON_CALL_MODEL_ANALYTICS_SERVICE}.
3756
3756
  */ var OnCallModelAnalyticsService = function OnCallModelAnalyticsService() {
3757
- _class_call_check$j(this, OnCallModelAnalyticsService);
3757
+ _class_call_check$i(this, OnCallModelAnalyticsService);
3758
3758
  };
3759
3759
  /**
3760
3760
  * Default injection token for the analytics service.
@@ -3776,7 +3776,7 @@ function _class_call_check$j(instance, Constructor) {
3776
3776
  * @deprecated Use {@link ON_CALL_MODEL_ANALYTICS_SERVICE} instead.
3777
3777
  */ var ON_CALL_MODEL_ANALYTICS_HANDLER = ON_CALL_MODEL_ANALYTICS_SERVICE;
3778
3778
 
3779
- function _class_call_check$i(instance, Constructor) {
3779
+ function _class_call_check$h(instance, Constructor) {
3780
3780
  if (!(instance instanceof Constructor)) {
3781
3781
  throw new TypeError("Cannot call a class as a function");
3782
3782
  }
@@ -3786,7 +3786,7 @@ function _class_call_check$i(instance, Constructor) {
3786
3786
  * Events are forwarded from FirebaseServerAnalyticsService to this listener
3787
3787
  * for processing by an analytics provider (e.g., Segment).
3788
3788
  */ var FirebaseServerAnalyticsServiceListener = function FirebaseServerAnalyticsServiceListener() {
3789
- _class_call_check$i(this, FirebaseServerAnalyticsServiceListener);
3789
+ _class_call_check$h(this, FirebaseServerAnalyticsServiceListener);
3790
3790
  };
3791
3791
  /**
3792
3792
  * Creates a default no-op {@link FirebaseServerAnalyticsServiceListener}.
@@ -3816,12 +3816,12 @@ function _call_super$3(_this, derived, args) {
3816
3816
  derived = _get_prototype_of$3(derived);
3817
3817
  return _possible_constructor_return$3(_this, _is_native_reflect_construct$3() ? Reflect.construct(derived, [], _get_prototype_of$3(_this).constructor) : derived.apply(_this, args));
3818
3818
  }
3819
- function _class_call_check$h(instance, Constructor) {
3819
+ function _class_call_check$g(instance, Constructor) {
3820
3820
  if (!(instance instanceof Constructor)) {
3821
3821
  throw new TypeError("Cannot call a class as a function");
3822
3822
  }
3823
3823
  }
3824
- function _defineProperties$a(target, props) {
3824
+ function _defineProperties$9(target, props) {
3825
3825
  for(var i = 0; i < props.length; i++){
3826
3826
  var descriptor = props[i];
3827
3827
  descriptor.enumerable = descriptor.enumerable || false;
@@ -3830,11 +3830,11 @@ function _defineProperties$a(target, props) {
3830
3830
  Object.defineProperty(target, descriptor.key, descriptor);
3831
3831
  }
3832
3832
  }
3833
- function _create_class$a(Constructor, protoProps, staticProps) {
3834
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
3833
+ function _create_class$9(Constructor, protoProps, staticProps) {
3834
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
3835
3835
  return Constructor;
3836
3836
  }
3837
- function _define_property$n(obj, key, value) {
3837
+ function _define_property$m(obj, key, value) {
3838
3838
  if (key in obj) {
3839
3839
  Object.defineProperty(obj, key, {
3840
3840
  value: value,
@@ -3914,9 +3914,9 @@ function _is_native_reflect_construct$3() {
3914
3914
  */ exports.FirebaseServerAnalyticsService = /*#__PURE__*/ function(OnCallModelAnalyticsService) {
3915
3915
  _inherits$3(FirebaseServerAnalyticsService, OnCallModelAnalyticsService);
3916
3916
  function FirebaseServerAnalyticsService(listener) {
3917
- _class_call_check$h(this, FirebaseServerAnalyticsService);
3917
+ _class_call_check$g(this, FirebaseServerAnalyticsService);
3918
3918
  var _this;
3919
- _this = _call_super$3(this, FirebaseServerAnalyticsService), _define_property$n(_this, "_listener", void 0);
3919
+ _this = _call_super$3(this, FirebaseServerAnalyticsService), _define_property$m(_this, "_listener", void 0);
3920
3920
  if (listener) {
3921
3921
  _this._listener = listener;
3922
3922
  } else {
@@ -3925,7 +3925,7 @@ function _is_native_reflect_construct$3() {
3925
3925
  }
3926
3926
  return _this;
3927
3927
  }
3928
- _create_class$a(FirebaseServerAnalyticsService, [
3928
+ _create_class$9(FirebaseServerAnalyticsService, [
3929
3929
  {
3930
3930
  key: "handleOnCallAnalyticsEvent",
3931
3931
  value: function handleOnCallAnalyticsEvent(event) {
@@ -4227,95 +4227,6 @@ function _ts_generator$8(thisArg, body) {
4227
4227
  })();
4228
4228
  }
4229
4229
 
4230
- function _class_call_check$g(instance, Constructor) {
4231
- if (!(instance instanceof Constructor)) {
4232
- throw new TypeError("Cannot call a class as a function");
4233
- }
4234
- }
4235
- function _defineProperties$9(target, props) {
4236
- for(var i = 0; i < props.length; i++){
4237
- var descriptor = props[i];
4238
- descriptor.enumerable = descriptor.enumerable || false;
4239
- descriptor.configurable = true;
4240
- if ("value" in descriptor) descriptor.writable = true;
4241
- Object.defineProperty(target, descriptor.key, descriptor);
4242
- }
4243
- }
4244
- function _create_class$9(Constructor, protoProps, staticProps) {
4245
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
4246
- return Constructor;
4247
- }
4248
- function _define_property$m(obj, key, value) {
4249
- if (key in obj) {
4250
- Object.defineProperty(obj, key, {
4251
- value: value,
4252
- enumerable: true,
4253
- configurable: true,
4254
- writable: true
4255
- });
4256
- } else {
4257
- obj[key] = value;
4258
- }
4259
- return obj;
4260
- }
4261
- /**
4262
- * Globally-registered resolver for the optional {@link OnCallModelAnalyticsService}.
4263
- *
4264
- * Calling `app.get()` directly for an optional provider through the NestFactory proxy is unsafe:
4265
- * the proxy wraps every method call in `ExceptionsZone`, which invokes `process.exit(1)` when
4266
- * the provider is missing — **before** any surrounding `try/catch` can intercept the error.
4267
- *
4268
- * This resolver sidesteps the issue by using `@Optional() @Inject()` at construction time,
4269
- * which NestJS handles gracefully (injecting `undefined` when the token is absent).
4270
- * When no service is registered, a no-op fallback from {@link noopOnCallModelAnalyticsService}
4271
- * is used instead.
4272
- *
4273
- * For custom analytics tokens, it falls back to `ModuleRef.get()` which is not proxied
4274
- * and throws a normal catchable exception.
4275
- *
4276
- * Register this provider globally via {@link buildNestServerRootModule} so that
4277
- * `app.get(OnCallModelAnalyticsResolver)` always succeeds through the proxy.
4278
- *
4279
- * @example
4280
- * ```typescript
4281
- * // Inside onCallModel dispatch:
4282
- * const resolver = app.get(OnCallModelAnalyticsResolver);
4283
- * const analytics = resolver.getAnalyticsService();
4284
- * ```
4285
- */ exports.OnCallModelAnalyticsResolver = /*#__PURE__*/ function() {
4286
- function OnCallModelAnalyticsResolver(moduleRef, service) {
4287
- _class_call_check$g(this, OnCallModelAnalyticsResolver);
4288
- _define_property$m(this, "moduleRef", void 0);
4289
- _define_property$m(this, "_service", void 0);
4290
- this.moduleRef = moduleRef;
4291
- this._service = service !== null && service !== void 0 ? service : noopOnCallModelAnalyticsService();
4292
- }
4293
- _create_class$9(OnCallModelAnalyticsResolver, [
4294
- {
4295
- /**
4296
- * Returns the analytics service for the given token, or the default
4297
- * {@link ON_CALL_MODEL_ANALYTICS_SERVICE} if no custom token is specified.
4298
- *
4299
- * @param token - Optional custom injection token override. When omitted or equal to
4300
- * {@link ON_CALL_MODEL_ANALYTICS_SERVICE}, returns the constructor-injected service.
4301
- * @returns The resolved analytics service.
4302
- */ key: "getAnalyticsService",
4303
- value: function getAnalyticsService(token) {
4304
- var result = token != null && token !== ON_CALL_MODEL_ANALYTICS_SERVICE ? this.moduleRef.get(token, {
4305
- strict: false
4306
- }) : this._service;
4307
- return result;
4308
- }
4309
- }
4310
- ]);
4311
- return OnCallModelAnalyticsResolver;
4312
- }();
4313
- exports.OnCallModelAnalyticsResolver = __decorate([
4314
- common.Injectable(),
4315
- __param(1, common.Optional()),
4316
- __param(1, common.Inject(ON_CALL_MODEL_ANALYTICS_SERVICE))
4317
- ], exports.OnCallModelAnalyticsResolver);
4318
-
4319
4230
  function _array_like_to_array$6(arr, len) {
4320
4231
  if (len == null || len > arr.length) len = arr.length;
4321
4232
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -4958,19 +4869,24 @@ function _object_spread_props$b(target, source) {
4958
4869
  // Aggregate _apiDetails from CRUD handlers in the map (built once at setup, not per-request)
4959
4870
  var aggregatedApiDetails = aggregateModelApiDetails(map);
4960
4871
  var modelApiDetails = aggregatedApiDetails !== null && aggregatedApiDetails !== void 0 ? aggregatedApiDetails : {};
4961
- // Resolve analytics service via OnCallModelAnalyticsResolver per-request.
4872
+ // Resolve analytics service per-request via ModuleRef.get().
4962
4873
  // Not cached because the NestJS application instance may differ across test suites
4963
4874
  // when the onCallModel closure is shared as a module-level singleton.
4964
4875
  //
4965
- // Uses OnCallModelAnalyticsResolver (which is always globally registered) instead of
4966
- // resolving ON_CALL_MODEL_ANALYTICS_SERVICE directly. Direct app.get() for an optional
4967
- // provider is unsafe: the NestFactory Proxy wraps method calls in ExceptionsZone, which
4968
- // calls process.exit(1) on missing providers before any try/catch can intercept the error.
4876
+ // Uses ModuleRef.get() instead of app.get() because the NestFactory Proxy wraps
4877
+ // app.get() in ExceptionsZone, which calls process.exit(1) on missing providers
4878
+ // before any try/catch can intercept. ModuleRef.get() is not proxied and throws a
4879
+ // normal catchable exception. Falls back to a no-op service if not registered.
4969
4880
  function getAnalyticsService(request) {
4970
- var resolver = request.nestApplication.get(exports.OnCallModelAnalyticsResolver, {
4971
- strict: false
4972
- });
4973
- return resolver.getAnalyticsService(analyticsToken);
4881
+ var token = analyticsToken !== null && analyticsToken !== void 0 ? analyticsToken : ON_CALL_MODEL_ANALYTICS_SERVICE;
4882
+ var moduleRef = request.nestApplication.get(core.ModuleRef);
4883
+ try {
4884
+ return moduleRef.get(token, {
4885
+ strict: false
4886
+ });
4887
+ } catch (unused) {
4888
+ return noopOnCallModelAnalyticsService();
4889
+ }
4974
4890
  }
4975
4891
  var fn = function fn(request) {
4976
4892
  var call = request.data.call;
@@ -9454,7 +9370,8 @@ var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
9454
9370
  // Respect explicit overrides; only compute defaults when not already set on the config
9455
9371
  var isApiEnabled = (_config_envConfig_isApiEnabled = config.envConfig.isApiEnabled) !== null && _config_envConfig_isApiEnabled !== void 0 ? _config_envConfig_isApiEnabled : appUrl != null && apiPrefix != null;
9456
9372
  var isWebhooksEnabled = (_config_envConfig_isWebhooksEnabled = config.envConfig.isWebhooksEnabled) !== null && _config_envConfig_isWebhooksEnabled !== void 0 ? _config_envConfig_isWebhooksEnabled : appUrl != null && Boolean(config.configureWebhooks);
9457
- var appApiUrl = (_config_envConfig_appApiUrl = config.envConfig.appApiUrl) !== null && _config_envConfig_appApiUrl !== void 0 ? _config_envConfig_appApiUrl : isApiEnabled && appUrl && apiPrefix ? util.websiteUrlFromPaths(appUrl, "/".concat(apiPrefix)) : undefined;
9373
+ var apiPrefixPath = apiPrefix ? apiPrefix.startsWith('/') ? apiPrefix : "/".concat(apiPrefix) : undefined;
9374
+ var appApiUrl = (_config_envConfig_appApiUrl = config.envConfig.appApiUrl) !== null && _config_envConfig_appApiUrl !== void 0 ? _config_envConfig_appApiUrl : isApiEnabled && appUrl && apiPrefixPath ? util.websiteUrlFromPaths(appUrl, apiPrefixPath) : undefined;
9458
9375
  var appWebhookUrl = (_config_envConfig_appWebhookUrl = config.envConfig.appWebhookUrl) !== null && _config_envConfig_appWebhookUrl !== void 0 ? _config_envConfig_appWebhookUrl : isWebhooksEnabled && appUrl ? util.websiteUrlFromPaths(appUrl, nestjs.DEFAULT_BASE_WEBHOOK_PATH) : undefined;
9459
9376
  var augmentedEnvConfig = _object_spread_props(_object_spread({}, config.envConfig), {
9460
9377
  appApiUrl: appApiUrl,
@@ -9496,10 +9413,6 @@ var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
9496
9413
  provide: GlobalRoutePrefixConfig,
9497
9414
  useValue: globalApiRoutePrefixConfig !== null && globalApiRoutePrefixConfig !== void 0 ? globalApiRoutePrefixConfig : {}
9498
9415
  });
9499
- // Analytics resolver — always available so that onCallModel can safely
9500
- // check for the optional ON_CALL_MODEL_ANALYTICS_SERVICE without triggering
9501
- // NestFactory's ExceptionsZone (which calls process.exit(1) on missing providers).
9502
- providers.push(exports.OnCallModelAnalyticsResolver);
9503
9416
  var rootModule = {
9504
9417
  module: FirebaseNestServerRootModule,
9505
9418
  imports: imports,